Storage API Reference
ArtifactStore
flowyml.storage.artifacts.ArtifactStore
Bases: ABC
Base class for artifact storage backends.
Functions
delete(path: str) -> None
abstractmethod
exists(path: str) -> bool
abstractmethod
list_artifacts(prefix: str = '') -> list[str]
abstractmethod
load(path: str) -> Any
abstractmethod
Load an artifact from storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Storage path of the artifact |
required |
Returns:
| Type | Description |
|---|---|
Any
|
The loaded artifact |
materialize(obj: Any, name: str, run_id: str, step_name: str, project_name: str = 'default') -> str
Materialize artifact to structured storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obj
|
Any
|
Object to materialize |
required |
name
|
str
|
Name of the artifact |
required |
run_id
|
str
|
ID of the current run |
required |
step_name
|
str
|
Name of the step producing the artifact |
required |
project_name
|
str
|
Name of the project |
'default'
|
Returns:
| Type | Description |
|---|---|
str
|
Path where artifact was saved |
Source code in flowyml/storage/artifacts.py
save(artifact: Any, path: str, metadata: dict | None = None) -> str
abstractmethod
Save an artifact to storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact
|
Any
|
The artifact to save |
required |
path
|
str
|
Storage path for the artifact |
required |
metadata
|
dict | None
|
Optional metadata dictionary |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Full path where artifact was saved |
Source code in flowyml/storage/artifacts.py
MetadataStore
flowyml.storage.metadata.MetadataStore
Bases: ABC
Base class for metadata storage backends.