Skip to content

Instantly share code, notes, and snippets.

@seisvelas
Last active January 6, 2019 19:52
Show Gist options
  • Save seisvelas/5aee7bf3708c32c74a70f27e429301cc to your computer and use it in GitHub Desktop.
Save seisvelas/5aee7bf3708c32c74a70f27e429301cc to your computer and use it in GitHub Desktop.
Reddit contribution (ca. 2013)
def upload(config_file):
bucket = s3.get_bucket(bucket_name)
# build a list of files already in the bucket
remote_files = {key.name : key.etag.strip('"') for key in bucket.list()}
# upload local files not already in the bucket
for root, dirs, files in os.walk(static_root):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment