/
Boto2
Boto2
Below example of how to list all containers and files in Swift using Boto and the S3 API. See http://boto.cloudhackers.com/en/latest/s3_tut.html for more information on how to use Boto.
Replace aws_access_key_id and aws_secret_access_key with your S3 API keys.
#!/usr/bin/env python import os import boto from boto.s3.connection import S3Connection if __name__ == "__main__": conn = S3Connection( aws_access_key_id="AAABBBCCC111222333", aws_secret_access_key="333222111CCCBBBAAA", port=443, host='object.cloud.sdsc.edu', is_secure=True, calling_format=boto.s3.connection.OrdinaryCallingFormat(), debug=0) buckets = conn.get_all_buckets() for bucket in buckets: print("BUCKET NAME: %s" % bucket.name) print("FILES:") for key in bucket.list(): print("\t%s" % key.name.encode('utf-8'))
, multiple selections available,
Related content
Generating S3 API Keys
Generating S3 API Keys
More like this
Boto3
Boto3
More like this
s3cmd
s3cmd
More like this
Cyberduck GUI
Cyberduck GUI
More like this
Boto 3
Boto 3
More like this
S3 API
S3 API
More like this