tensorbay.client.storage_config#
Related classes for the Storage Config.
- class tensorbay.client.cloud_storage.CloudClient(name, client)[source]#
Bases:
object
CloudClient
defines the client to interact between local and cloud platform.- Parameters
name (str) – Name of the auth cloud storage config.
client (tensorbay.client.requests.Client) – The initial client to interact between local and TensorBay.
- Return type
None
- class tensorbay.client.cloud_storage.StorageConfig(name, file_path, type_, is_graviti_storage)[source]#
Bases:
tensorbay.utility.attr.AttrsMixin
,tensorbay.utility.repr.ReprMixin
This is a class stores the information of storage config.
- Parameters
name (str) – The storage config name.
file_path (str) – Storage config path of the bucket.
type – Type of the storage provider, such as oss, s3, azure.
is_graviti_storage (bool) – Whether the config is belong to graviti.
type_ (str) –
- Return type
None
- classmethod loads(contents)[source]#
Loads a
StorageConfig
instance from the given contents.- Parameters
contents (Dict[str, Any]) –
The given dict containing the storage config:
{ "name": <str>, "filePath": <str>, "type": <str>, "isGravitiStorage": <boolean> }
- Returns
The loaded
StorageConfig
instance.- Return type
tensorbay.client.cloud_storage._T