Project methods
The Project
object comes with two sets of methods: CRUD methods and, according to the SDK digitalhub layer installed, entity specific CRUD methods.
CRUD methods
Crud methods are used to interact with the entity object in the backend or locally.
save()
: Save or update the entity into the backend.export()
: Export the entity locally as yaml file.refresh()
: Refresh (read) the entity from the backend.
save
Save entity into backend.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
update |
bool
|
If True, the object will be updated. |
False
|
Returns:
Type | Description |
---|---|
Project
|
Entity saved. |
export
Export object as a YAML file. If the objects are not embedded, the objects are exported as a YAML file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
Name of the export YAML file. If not specified, the default value is used. |
None
|
Returns:
Type | Description |
---|---|
None
|
|
refresh
Entity CRUD
The project acts as context for other entities as mentioned in the introduction. With a Project
object, you can create, read, update and delete these entities. The methods exposed are basically the same as the CRUD entities, the only difference is that on the project object you omit the project name as parameter. The available methods and are:
new
: create a new entitylog
: create and upload an entity (only forartifacts
,dataitems
andmodels
)get
: get an entity from backendget_versions
: get all version for a named entitylist
: list entities related to the projectimport
: import an entityupdate
: update an entitydelete
: delete an entity
Layers
Each digitalhub layer exposes CRUD handles different aspects of dataops and mlops. Here follows a list of the methods exposed by the Project
class according to each layer. Please refer to the specific entity documentation for more information.
Core layer
The entity handled by the Project
class in the core layer (digitalhub_core
) are:
Data layer
The entity handled by the Project
class in the data layer (digitalhub_data
) are:
Ml layer
The entity handled by the Project
class in the ml layer (digitalhub_ml
) are: