nat.cli.commands.object_store.object_store#
Attributes#
Functions#
Process common object store arguments and return the config class |
|
|
Upload a single file to object store. |
|
Decorator that handles the common object store command pattern. |
|
Upload a directory to an object store. |
|
Delete files from an object store. |
|
Manage object store operations including uploading files and directories. |
Module Contents#
- logger#
- STORE_CONFIGS#
- get_object_store_config(
- \*\*kwargs,
Process common object store arguments and return the config class
- async upload_file(
- object_store: nat.object_store.interfaces.ObjectStore,
- file_path: pathlib.Path,
- key: str,
Upload a single file to object store.
- Args:
object_store: The object store instance to use. file_path: The path to the file to upload. key: The key to upload the file to.
- object_store_command_decorator(async_func)#
Decorator that handles the common object store command pattern.
The decorated function should take (store: ObjectStore, kwargs) as parameters and return an exit code (0 for success).
- async upload_command(
- store: nat.object_store.interfaces.ObjectStore,
- local_dir: pathlib.Path,
- **_kwargs,
Upload a directory to an object store.
- Args:
local_dir: The local directory to upload. store: The object store to use. _kwargs: Additional keyword arguments.
- async delete_command(
- store: nat.object_store.interfaces.ObjectStore,
- keys: list[str],
- **_kwargs,
Delete files from an object store.
- Args:
store: The object store to use. keys: The keys to delete. _kwargs: Additional keyword arguments.
- object_store_command(**_kwargs)#
Manage object store operations including uploading files and directories.
- register_object_store_commands()#