# {py:mod}`ovo.core.storage` ```{py:module} ovo.core.storage ``` ```{autodoc2-docstring} ovo.core.storage :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Storage ` - ```{autodoc2-docstring} ovo.core.storage.Storage :summary: ``` ```` ### API `````{py:class} Storage(storage_root: str, aws: ovo.core.aws.AWSSessionManager | None, verbose: bool = False, memory_cache_limit_bytes=50 * 1024 * 1024, disk_cache_limit_bytes=200 * 1024 * 1024, memory_cache_limit_per_file_bytes=5 * 1024 * 1024) :canonical: ovo.core.storage.Storage ```{autodoc2-docstring} ovo.core.storage.Storage ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} ovo.core.storage.Storage.__init__ ``` ````{py:method} _clear_temp_dir() :canonical: ovo.core.storage.Storage._clear_temp_dir ```{autodoc2-docstring} ovo.core.storage.Storage._clear_temp_dir ``` ```` ````{py:method} _cache_read(file_path) :canonical: ovo.core.storage.Storage._cache_read ```{autodoc2-docstring} ovo.core.storage.Storage._cache_read ``` ```` ````{py:method} _cache_store(file_path, content: str | bytes) :canonical: ovo.core.storage.Storage._cache_store ```{autodoc2-docstring} ovo.core.storage.Storage._cache_store ``` ```` ````{py:method} parse_path(path: str) -> tuple[str, str, str] :canonical: ovo.core.storage.Storage.parse_path :staticmethod: ```{autodoc2-docstring} ovo.core.storage.Storage.parse_path ``` ```` ````{py:method} list_dir(abs_path: str, only_dir=False, recursive=False) -> list[str] :canonical: ovo.core.storage.Storage.list_dir ```{autodoc2-docstring} ovo.core.storage.Storage.list_dir ``` ```` ````{py:method} file_exists(storage_path) -> bool :canonical: ovo.core.storage.Storage.file_exists ```{autodoc2-docstring} ovo.core.storage.Storage.file_exists ``` ```` ````{py:method} read_file_bytes(storage_path, cache_store: bool = True) -> bytes :canonical: ovo.core.storage.Storage.read_file_bytes ```{autodoc2-docstring} ovo.core.storage.Storage.read_file_bytes ``` ```` ````{py:method} read_file_str(storage_path: str, cache_store: bool = True) -> str :canonical: ovo.core.storage.Storage.read_file_str ```{autodoc2-docstring} ovo.core.storage.Storage.read_file_str ``` ```` ````{py:method} read_file_pickle(storage_path: str) :canonical: ovo.core.storage.Storage.read_file_pickle ```{autodoc2-docstring} ovo.core.storage.Storage.read_file_pickle ``` ```` ````{py:method} resolve_path(storage_path: str) -> str :canonical: ovo.core.storage.Storage.resolve_path ```{autodoc2-docstring} ovo.core.storage.Storage.resolve_path ``` ```` ````{py:method} store_file_path(source_abs_path: str, storage_rel_path: str, overwrite: bool = True) -> str :canonical: ovo.core.storage.Storage.store_file_path ```{autodoc2-docstring} ovo.core.storage.Storage.store_file_path ``` ```` ````{py:method} store_file_bytes(file_bytes: bytes, storage_rel_path: str, overwrite: bool = True) -> str :canonical: ovo.core.storage.Storage.store_file_bytes ```{autodoc2-docstring} ovo.core.storage.Storage.store_file_bytes ``` ```` ````{py:method} store_file_str(file_str: str, storage_rel_path: str, overwrite: bool = True) -> str :canonical: ovo.core.storage.Storage.store_file_str ```{autodoc2-docstring} ovo.core.storage.Storage.store_file_str ``` ```` ````{py:method} store_input(project_id: str, file_path: str = None, file_bytes: bytes = None, file_str: str = None, filename: str = None, overwrite: bool = True) -> str :canonical: ovo.core.storage.Storage.store_input ```{autodoc2-docstring} ovo.core.storage.Storage.store_input ``` ```` ````{py:method} create_zip(storage_paths_by_dir: dict[str, list[str]]) -> bytes :canonical: ovo.core.storage.Storage.create_zip ```{autodoc2-docstring} ovo.core.storage.Storage.create_zip ``` ```` ````{py:method} sync_file(storage_path: str, local_destination_path: str, link: bool = False) :canonical: ovo.core.storage.Storage.sync_file ```{autodoc2-docstring} ovo.core.storage.Storage.sync_file ``` ```` ````{py:method} sync_files(storage_paths: list[str], local_destination_dir: str, preserve_subdirs=False) :canonical: ovo.core.storage.Storage.sync_files ```{autodoc2-docstring} ovo.core.storage.Storage.sync_files ``` ```` ````{py:method} is_local_path(path) :canonical: ovo.core.storage.Storage.is_local_path ```{autodoc2-docstring} ovo.core.storage.Storage.is_local_path ``` ```` ````{py:method} sync_directory(source_dir: str, local_destination_dir: str, link=False) :canonical: ovo.core.storage.Storage.sync_directory ```{autodoc2-docstring} ovo.core.storage.Storage.sync_directory ``` ```` ````{py:method} prepare_workflow_input(storage_path: str, workdir: str, input_bytes: bytes = None, name: str = None, custom_hash: str = None) -> str :canonical: ovo.core.storage.Storage.prepare_workflow_input ```{autodoc2-docstring} ovo.core.storage.Storage.prepare_workflow_input ``` ```` ````{py:method} prepare_workflow_inputs(storage_paths: list[str], workdir: str, names: typing.List[str] = None, return_paths=False, single_directory=False) -> str | list[str] :canonical: ovo.core.storage.Storage.prepare_workflow_inputs ```{autodoc2-docstring} ovo.core.storage.Storage.prepare_workflow_inputs ``` ```` `````