s3
- anemoi.utils.s3.s3_client(*args: Any, **kwargs: Any) Any
Create an S3 client.
- Parameters:
*args (Any) – Positional arguments for the S3 client.
**kwargs (Any) – Keyword arguments for the S3 client.
- Returns:
The S3 client.
- Return type:
Any
- anemoi.utils.s3.upload(source: str, target: str, *, overwrite: bool = False, resume: bool = False, verbosity: int = 1, progress: Callable | None = None, threads: int = 1) None
Upload a file to S3.
- Parameters:
source (str) – The source file path.
target (str) – The target S3 path.
overwrite (bool, optional) – Whether to overwrite the target file, by default False.
resume (bool, optional) – Whether to resume a previous upload, by default False.
verbosity (int, optional) – The verbosity level, by default 1.
progress (Callable, optional) – A callback function for progress updates, by default None.
threads (int, optional) – The number of threads to use, by default 1.