Created
May 9, 2021 10:42
-
-
Save morganmcg1/eef76dbe7e9b6d1118967507333f7acb to your computer and use it in GitHub Desktop.
Download S3
This file contains 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 characters
import boto3 | |
import os | |
import pickle | |
my_bucket = "prosecraft-manuscript-archives" | |
my_file = "manuscript-samples-2021-05-06.zip" | |
s3 = boto3.resource('s3') | |
obj = s3.Object(my_bucket, my_file) | |
body = obj.get()['Body'].read() | |
samples_file = open('samples.zip', 'wb') | |
pickle.dump(body, samples_file) | |
!unzip samples.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment