- class composer.utils.ObjectStore#
Abstract class for implementing object stores, such as LibcloudObjectStore and S3ObjectStore.
Close the object store.
- download_object(object_name, filename, overwrite=False, callback=None)#
Download an object to the specified destination path.
object_name (str) – The name of the object to download.
overwrite (bool, optional) – Whether to overwrite an existing file at
filename, if it exists. (default:
callback ((int) -> None, optional) – If specified, the callback is periodically called with the number of bytes already downloaded and the total size of the object.
Get the size of an object, in bytes.
Returns the URI for
This function does not check that
object_nameis in the object store. It computes the URI statically.
object_name (str) – The object name.
str – The URI for
object_namein the object store.
- upload_object(object_name, filename, callback=None)#
Upload an object currently located on a disk.
object_name (str) – Object name (where object will be stored in the container)
ObjectStoreTransientError – If there was a transient connection issue with uploading the object.