Last active
February 25, 2018 03:10
-
-
Save tati/73104791bafb58befa092867b6d579e5 to your computer and use it in GitHub Desktop.
Revisions
-
tati revised this gist
Oct 15, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ from boto3 import session from botocore.client import Config -
tati revised this gist
Oct 15, 2017 . 1 changed file with 17 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,17 @@ import boto3 from boto3 import session from botocore.client import Config ACCESS_ID = 'XXXXXXX' SECRET_KEY = 'XXXXXXX' # Initiate session session = session.Session() client = session.client('s3', region_name='nyc3', endpoint_url='https://nyc3.digitaloceanspaces.com', aws_access_key_id=ACCESS_ID, aws_secret_access_key=SECRET_KEY) # Upload a file to your Space client.upload_file('test.html', 'hello-spaces', 'new-folder/new_file_name.html') -
tati revised this gist
Oct 15, 2017 . 1 changed file with 4 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,4 @@ # List all buckets on your account. response = client.list_buckets() spaces = [space[‘Name’] for space in response[‘Buckets’]] print(“Spaces List: %s” % spaces) -
tati revised this gist
Oct 15, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,3 +12,6 @@ endpoint_url='https://nyc3.digitaloceanspaces.com', aws_access_key_id=ACCESS_ID, aws_secret_access_key=SECRET_KEY) NEW_BUCKET_NAME = 'hello-spaces' client.create_bucket(Bucket=NEW_BUCKET_NAME ) -
tati revised this gist
Oct 15, 2017 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,13 @@ from boto3 import session from botocore.client import Config ACCESS_ID = 'XXXXXXX' SECRET_KEY = 'XXXXXXX' # Initiate session session = session.Session() client = session.client('s3', region_name='nyc3', endpoint_url='https://nyc3.digitaloceanspaces.com', aws_access_key_id=ACCESS_ID, aws_secret_access_key=SECRET_KEY) -
tati revised this gist
Oct 15, 2017 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,11 @@ import boto3 from boto3 import session from botocore.client import Config # Initiate session session = session.Session() client = session.client('s3', region_name='nyc3', endpoint_url='https://nyc3.digitaloceanspaces.com', aws_access_key_id=ACCESS_ID, aws_secret_access_key=SECRET_KEY) -
tati created this gist
Oct 15, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Initiate session session = session.Session() client = session.client(‘s3’, region_name=’nyc3', endpoint_url=’https://nyc3.digitaloceanspaces.com', aws_access_key_id=<INSERT ACCESS_ID>, aws_secret_access_key=<INSERT SECRET_KEY>)