Utility for uploading to and downloading from object (blob) stores, such as Amazon S3. .. rubric:: Example Here's an example for an Amazon S3 bucket named ``MY_CONTAINER``: >>> from composer.utils import LibcloudObjectStore >>> object_store = LibcloudObjectStore( ... provi
| 19 | |
| 20 | |
| 21 | class LibcloudObjectStore(ObjectStore): |
| 22 | """Utility for uploading to and downloading from object (blob) stores, such as Amazon S3. |
| 23 | |
| 24 | .. rubric:: Example |
| 25 | |
| 26 | Here's an example for an Amazon S3 bucket named ``MY_CONTAINER``: |
| 27 | |
| 28 | >>> from composer.utils import LibcloudObjectStore |
| 29 | >>> object_store = LibcloudObjectStore( |
| 30 | ... provider="s3", |
| 31 | ... container="MY_CONTAINER", |
| 32 | ... provider_kwargs={ |
| 33 | ... "key": "AKIA...", |
| 34 | ... "secret": "*********", |
| 35 | ... } |
| 36 | ... ) |
| 37 | >>> object_store |
| 38 | <composer.utils.object_store.libcloud_object_store.LibcloudObjectStore object at ...> |
| 39 | |
| 40 | Args: |
| 41 | provider (str): Cloud provider to use. Valid options are: |
| 42 | |
| 43 | * :mod:`~libcloud.storage.drivers.atmos` |
| 44 | * :mod:`~libcloud.storage.drivers.auroraobjects` |
| 45 | * :mod:`~libcloud.storage.drivers.azure_blobs` |
| 46 | * :mod:`~libcloud.storage.drivers.backblaze_b2` |
| 47 | * :mod:`~libcloud.storage.drivers.cloudfiles` |
| 48 | * :mod:`~libcloud.storage.drivers.digitalocean_spaces` |
| 49 | * :mod:`~libcloud.storage.drivers.google_storage` |
| 50 | * :mod:`~libcloud.storage.drivers.ktucloud` |
| 51 | * :mod:`~libcloud.storage.drivers.local` |
| 52 | * :mod:`~libcloud.storage.drivers.minio` |
| 53 | * :mod:`~libcloud.storage.drivers.nimbus` |
| 54 | * :mod:`~libcloud.storage.drivers.ninefold` |
| 55 | * :mod:`~libcloud.storage.drivers.oss` |
| 56 | * :mod:`~libcloud.storage.drivers.rgw` |
| 57 | * :mod:`~libcloud.storage.drivers.s3` |
| 58 | |
| 59 | .. seealso:: :doc:`Full list of libcloud providers <libcloud:storage/supported_providers>` |
| 60 | |
| 61 | container (str): The name of the container (i.e. bucket) to use. |
| 62 | provider_kwargs (dict[str, Any], optional): Keyword arguments to pass into the constructor |
| 63 | for the specified provider. These arguments would usually include the cloud region |
| 64 | and credentials. |
| 65 | |
| 66 | Common keys are: |
| 67 | |
| 68 | * ``key`` (str): API key or username to be used (required). |
| 69 | * ``secret`` (str): Secret password to be used (required). |
| 70 | * ``secure`` (bool): Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default. |
| 71 | * ``host`` (str): Override hostname used for connections. |
| 72 | * ``port`` (int): Override port used for connections. |
| 73 | * ``api_version`` (str): Optional API version. Only used by drivers which support multiple API versions. |
| 74 | * ``region`` (str): Optional driver region. Only used by drivers which support multiple regions. |
| 75 | |
| 76 | .. seealso:: :class:`libcloud.storage.base.StorageDriver` |
| 77 | |
| 78 | key_environ (str, optional): Environment variable name for the API Key. Only used |
no outgoing calls