MutableMapping interfaces for common cloud storage providers
Project description
cloud-mappings
MutableMapping implementations for common cloud storage providers
For now AzureBlobMapping
and GoogleCloudStorageMapping
are implemented. AWS S3 is next on the list.
Installation
with pip:
pip install cloud-mappings
Basic Usage
Step 1: Instantiate a mapping backed by your chosen cloud storage provider
Step 2: Use it just like a standard dict()
AzureBlobMapping:
from cloudmappings import AzureBlobMapping
cm = AzureBlobMapping.with_pickle(
account_url="AZURE_BLOB_STORAGE_URL",
container_name="CONTAINER_NAME",
credential=AZURE_CREDENTIAL_OBJECT,
)
GoogleCloudStorageMapping:
from cloudmappings import GoogleCloudStorageMapping
cm = GoogleCloudStorageMapping.with_pickle(
project="GCP_PROJECT",
credentials=GCP_CREDENTIALS_OBJECT,
bucket_name="BUCKET_NAME",
)
AWSS3Mapping:
from cloudmappings import AWSS3Mapping
cm = AWSS3Mapping.with_pickle(
bucket_name="AWS_BUCKET_NAME",
silence_warning=False,
)
Note that AWS S3 does not support server atomic requests, so it is not recommended for concurrent use. A warning is printed out by default but may be silenced by passing silence_warning=True
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cloud-mappings-0.7.2.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for cloud_mappings-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 890ac51a3d66e94e24d00fc113710cef4cb064e8aef0b3095b31b0fa54de5ad2 |
|
MD5 | aa86d98d9afb37cecda2dc1371f09e5e |
|
BLAKE2b-256 | 6577602a3cf6362ff4d76425906d0d7ecf4f2a9285d414137ff00b56bda36d2a |