Sqlite3 Adapter Class#
- class expectmine.storage.adapters.sqlite3_adapter.Sqlite3StoreAdapter(persistent_path: Path, working_directory: Path, **kwargs: Dict[Any, Any])[source]#
Bases:
BaseStoreAdapterPipeline storage adapter for Sqlite3Storage.
- __init__(persistent_path: Path, working_directory: Path, **kwargs: Dict[Any, Any])[source]#
Creates a factory for producing scoped storages.
- Parameters:
persistent_path (Path) β The path which the storage can use to persist data.
working_directory (Path) β The path which the storage can use to create temporary files in for the user or pipeline to access.
- Example:
>>> BaseAdapter(Path("path1"), Path("path2")) BaseAdapter
>>> BaseAdapter(Path("path2")) ValueError("Storage paths can not be empty.")
- Raises:
TypeError β If the arguments have the wrong type.
ValueError β If either step name or any of the paths are empty.
- get_instance(step_name: str, *args: List[Any], **kwargs: Dict[Any, Any]) BaseStore[source]#
Produces a scoped instance of type BaseStorage.
- Parameters:
step_name (str) β The scope of the instance
- Returns:
A scoped instance of a store.
- Return type:
- Example:
>>> get_instance("Instance 1") BaseStore
>>> get_instance("") ValueError("Step name can not be empty.")
- Raises:
TypeError β If the arguments have the wrong type.
ValueError β If step name is too long or empty.