ovo.core.logic.import_export_logic¶
Module Contents¶
Functions¶
Unified function to copy a project from source database/storage to destination database/storage. |
|
Export a single project and all associated data to a ZIP file containing ovo.db (SQLite database), storage subdirectory with all files, and config.yml. |
|
Import project from extracted directory. |
Data¶
API¶
- ovo.core.logic.import_export_logic.IMPORT_EXPORT_CONFIGS¶
None
- ovo.core.logic.import_export_logic.find_storage_path_fields(cls, prefix: str = '') list[str]¶
- ovo.core.logic.import_export_logic.export_import_project(source_db: ovo.core.database.DBEngine, source_storage: ovo.core.storage.Storage, dest_db: ovo.core.database.DBEngine, dest_dir: str, project_id: str = None, check_conflicts=True, count_only=False, accepted_only=False) dict¶
Unified function to copy a project from source database/storage to destination database/storage.
Args: source_db: Database engine to read from dest_db: Database engine to write to project_id: ID of the project to copy (if None, copy all projects) source_storage: Storage instance to read files from dest_dir: Destination storage directory check_conflicts: Whether to check for ID conflicts in destination database count_only: If True, only count entities without copying them accepted_only: Only include accepted Designs
Returns: dict: Summary with counts of copied entities
- ovo.core.logic.import_export_logic.export_project(project_id: str, output_zip_path: str = None, accepted_only: bool = False) str¶
Export a single project and all associated data to a ZIP file containing ovo.db (SQLite database), storage subdirectory with all files, and config.yml.
Args: project_id: ID of the project to export output_zip_path: Optional output zip path. Temporary file path will be used if not provided. accepted_only: Only export Designs that are accepted.
Returns: str: Path to the exported ZIP file
- ovo.core.logic.import_export_logic.import_project(home_dir: str, project_id: str = None, count_only=False) dict[str, int]¶
Import project from extracted directory.
Args: home_dir: Path to extracted directory containing ovo.db, storage files and config.yml project_id: ID of the project to import (if None, import all projects)
Returns: counts: number of