Package: cloudstorage
Cloud Storageis a Python +3.5 package which creates a unified API for the
cloud storage services: Amazon Simple Storage Service (S3),
Microsoft Azure Storage, Minio Cloud Storage, Rackspace Cloud Files,
Google Cloud Storage, and the Local File System.Cloud Storage is inspired byApache Libcloud.
Advantages to Apache Libcloud Storage are:Full Python 3 support.Generate temporary signed URLs for downloading and uploading files.Support for request and response headers like Content-Disposition.Pythonic! Iterate through all blobs in containers and all containers in
storage using respective objects.Usage>>>fromcloudstorage.drivers.amazonimportS3Driver>>>storage=S3Driver(key='<my-aws-access-key-id>',secret='<my-aws-secret-access-key>')>>>container=storage.create_container('avatars')>>>container.cdn_url'https://avatars.s3.amazonaws.com/'>>>avatar_blob=container.upload_blob('/path/my-avatar.png')>>>avatar_blob.cdn_url'https://s3.amazonaws.com/avatars/my-avatar.png'>>>avatar_blob.generate_download_url(expires=3600)'https://avatars.s3.amazonaws.com/my-avatar.png?''AWSAccessKeyId=<my-aws-access-key-id>''&Signature=<generated-signature>''&Expires=1491849102'>>>container.generate_upload_url('user-1-avatar.png',expires=3600){'url':'https://avatars.s3.amazonaws.com/','fields':{'key':'user-1-avatar.png','AWSAccessKeyId':'<my-aws-access-key-id>','policy':'<generated-policy>','signature':'<generated-signature>'}}Supported ServicesAmazon S3Google Cloud StorageMicrosoft Azure StorageMinio Cloud StorageRackspace CloudFilesLocal File SystemInstallationTo install Cloud Storage:pipinstallcloudstorageAlso install the storage driver(s) you will be using:pipinstallcloudstorage[amazon]pipinstallcloudstorage[google]pipinstallcloudstorage[local]pipinstallcloudstorage[microsoft]pipinstallcloudstorage[minio]pipinstallcloudstorage[rackspace]Changelog1.0.0 (Unreleased)FeaturesStart following (Semantic Versioning).0.11.0 (2021-01-15)FeaturesAtomic local file write (#68). Thanks @habibutsu.New DigitalOcean Spaces Driver (#67). Thanks @RangelReale.BugsConvertbytestostrbefore saving the json file for Windows Xattr simulator (#66). Thanks @RangelReale!Handlepathlib.Pathproperly forBlob.downloaddownload andContainer.upload_blob(#65). Thanks @sibowsb!Fix BobNotFoundErrormessage for AWS driver (#64). Thanks @sibowsb!0.10.1 (2020-04-20)FeaturesAdd support to mimicxattrin Windows by storing data in.<filename>.xattr(#56). Thanks @RangelReale.Add support forpython 3.8.BugsFreeze packageazureto version4.0.0(#58).Drop support forpython 3.4due toPyYAMLrequirement!=3.4.*.0.10.0 (2019-08-10)BugsAzureget_blobraisesTypeErrorwhen Content MD5 missing in remote (#47). Thanks @matt-carr.AzureStorageDriverreads stream twice without rewinding (#44). Thanks @matt-carr.Update package dependencies to fix tests (#43).Changes from 0.9.0:Azure driver will issue a warning if Content MD5 is not populated.Google driver tests will not run if credentials file is not present.0.9.0 (2018-11-29)FeaturesDriver authentication can be verified usingDriverName.validate_credentials()(#34).Changes from 0.8.0:InitializingGoogleStorageDriverwith an invalid credentials file will
raiseCredentialsErrorexception instead ofCloudStorageError.0.8.0 (2018-11-06)FeaturesBlobandContainer’smeta_datais now a case insensitive dictionary.Add new driver for Minio Cloud Storage (#25).
Install driver requirements with:pip install cloudstorage[minio].OtherMove tosrcfolder structure for package.0.7.0 (2018-10-03)FeaturesCache-Controlsupported for Amazon, Google, Local, and Microsoft (#11).Each driver’s package dependencies are now optional (#4).OtherRemove rackspace package dependencyrfc6266_parser.Addflake8linting andsphinxdoc building to tox and travis.0.6 (2018-07-24)Copy metadata fromsetup.pytosetup.cfgAdd rate limit timeout when calling google cloud storage backend during tests.CatchUnicodeDecodeErrorwhen decoding local file attribute values.Upgrade dependencies and includerequirements.txtanddev-requirements.txt.0.5 (2018-02-26)Update rackspacesdk to 0.7.5 and fix broken API calls (#14).0.4 (2017-08-29)Implement Microsoft Azure Storage driver (#1).Google upload_blob is failing for binary stream (#7and#8).Fixed type annotations using mypy.Formatted code using flake8 recommendations.0.3 (2017-05-24)Fixes#6: Add kwargs to each driver’s init method.0.2 (2017-04-21)Add pip cache to travis yml file to speed up tests.Set wheel python-tag to py3 onlySet tox to pass all env variables to py.testAdd travis repo encrypted env variables for running tests.0.1 (2017-04-20)First release.