Artifact
The artifact kind represents a generic artifact stored as a file in an artifact store. Use it when you need to upload, download, or register files without additional kind-specific behavior.
The destination path and original src_path are documented with the creation functions. Use a supported local or remote path for the artifact destination.
Create
Log
log_artifact
Create an artifact entity and upload a local source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
str
|
Project name. |
required |
source
|
SourcesOrListOfSources
|
Local artifact source path or paths. |
required |
name
|
str
|
Entity name. If omitted, it is inferred from |
None
|
drop_existing
|
bool
|
Whether to remove an existing entity with the same name. |
False
|
path
|
str
|
Destination path. If omitted, it is generated. |
None
|
version
|
str
|
Entity version. |
None
|
description
|
str
|
Human-readable entity description. |
None
|
labels
|
list[str]
|
Entity labels. |
None
|
src_path
|
str
|
Original source path stored in the artifact specification. |
None
|
**kwargs
|
dict
|
Additional artifact specification parameters. |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactArtifact
|
Created artifact entity with uploaded files. |
Register
register_artifact
Register an artifact entity for an existing source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
str
|
Project name. |
required |
source
|
SourcesOrListOfSources
|
Path or URI of the existing artifact. |
required |
name
|
str
|
Entity name. If omitted, it is inferred from |
None
|
uuid
|
str
|
Entity identifier. |
None
|
version
|
str
|
Entity version. |
None
|
description
|
str
|
Human-readable entity description. |
None
|
labels
|
list[str]
|
Entity labels. |
None
|
embedded
|
bool
|
Whether to embed the entity specification in the project specification. |
False
|
extensions
|
list[dict]
|
Entity extensions. |
None
|
src_path
|
str
|
Original source path stored in the artifact specification. |
None
|
**kwargs
|
dict
|
Additional artifact specification parameters. |
{}
|
Returns:
| Type | Description |
|---|---|
ArtifactArtifact
|
Registered artifact entity. |
New
new_artifact
Create a new artifact entity in the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
str
|
Project name. |
required |
name
|
str
|
Entity name. |
required |
kind
|
str
|
Entity kind. |
required |
uuid
|
str
|
Entity identifier. |
None
|
version
|
str
|
Entity version. |
None
|
description
|
str
|
Human-readable entity description. |
None
|
labels
|
list[str]
|
Entity labels. |
None
|
embedded
|
bool
|
Whether to embed the entity specification in the project specification. |
False
|
path
|
str
|
Entity path on the local file system or remote storage. It is also the destination path for uploads. |
None
|
extensions
|
list[dict]
|
Entity extensions. |
None
|
**kwargs
|
dict
|
Additional entity specification parameters. |
{}
|
Returns:
| Type | Description |
|---|---|
Artifact
|
Created artifact entity. |
Methods
The artifact kind does not add instance methods. See Use an artifact for the common methods.