roboto.file_infra.object_store.s3#
Module Contents#
- class roboto.file_infra.object_store.s3.S3Store(s3_client, transfer_config=None)#
Bases:
roboto.file_infra.object_store.object_store.ObjectStoreBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto(Protocol[T]): def meth(self) -> T: ...
- Parameters:
s3_client (botocore.client.BaseClient)
transfer_config (Optional[boto3.s3.transfer.TransferConfig])
- classmethod create(credential_provider, **kwargs)#
Factory function to assemble an S3Store with refreshable credentials.
- Parameters:
credential_provider (roboto.file_infra.object_store.object_store.CredentialProvider)
- Return type:
- put(source, destination_uri)#
Uploads a local file to a specific cloud URI.
- Parameters:
source (pathlib.Path) – Local path to the file.
destination_uri (str) – Full URI (e.g., ‘s3://my-bucket/folder/data.csv’)
- Return type:
roboto.file_infra.object_store.object_store.FutureLike[None]