Project methods
The Project
object comes with three sets of methods: CRUD methods, entity specific CRUD methods and project specific 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 |
---|---|
str
|
Exported file. |
refresh
Refresh object from backend.
Returns:
Type | Description |
---|---|
Project
|
Project object. |
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 entityget
: 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
For more information about the entity methods, see the rekative entity documentation:
Project specific methods
The project object exposes the following methods:
run
: execute a workflow from the project
run
Run workflow project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
workflow
|
str
|
Workflow name. |
None
|
**kwargs
|
dict
|
Keyword arguments passed to workflow.run(). |
{}
|
Returns:
Type | Description |
---|---|
Run
|
Run instance. |