app.core package
Subpackages
Submodules
app.core.dvc_client module
- class DVCClient[source]
Bases:
objectHandles DVC operations with S3-like remote, using temporary files.
- read_data_from(source: str, bucket_name=None) Any | None[source]
Reads an object from a S3 bucket
- Parameters:
source (str) – Path under the object is available.
bucket_name (str, optional) – Bucket name to upload to. Defaults to None. If not provided, a default name from the environment space will be used.
- Returns:
Downloaded (python) object.
- Return type:
Union[Any, None]
- save_data_to(obj: Any, destination: str, bucket_name=None) bool[source]
Upload an object to a S3 bucket
- Parameters:
obj (Any) – Object to upload.
bucket_name (str, optional) – Bucket name to upload to. Defaults to None. If not provided, a default name from the environment space will be used.
destination (str) – Location under the object should be saved.
- Returns:
True if file was uploaded, else False.
- Return type:
bool