Entity and methods
Artifact
Bases: MaterialEntity
A class representing a artifact.
Artifacts are (binary) objects stored in one of the artifact stores of the platform, and available to every process, module and component as files.
Source code in digitalhub_core/entities/artifact/entity/_base.py
artifact_from_dict(obj)
Create a new object from dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj |
dict
|
Dictionary to create object from. |
required |
Returns:
Type | Description |
---|---|
Artifact
|
Object instance. |
Source code in digitalhub_core/entities/artifact/builder.py
artifact_from_parameters(project, name, kind, uuid=None, description=None, labels=None, embedded=True, path=None, **kwargs)
Create a new object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
str
|
Project name. |
required |
name |
str
|
Object name. |
required |
kind |
str
|
Kind the object. |
required |
uuid |
str
|
ID of the object (UUID4, e.g. 40f25c4b-d26b-4221-b048-9527aff291e2). |
None
|
description |
str
|
Description of the object (human readable). |
None
|
labels |
list[str]
|
List of labels. |
None
|
embedded |
bool
|
Flag to determine if object spec must be embedded in project spec. |
True
|
path |
str
|
Object path on local file system or remote storage. It is also the destination path of upload() method. |
None
|
**kwargs |
dict
|
Spec keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
Artifact
|
Object instance. |