Manage projects
The methods below retrieve, import, update, or delete projects. For project creation, see Create a project.
Read
Use the read methods to retrieve projects from the backend or load them from a YAML descriptor.
get_project
Get a project entity from the backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Project name. |
required |
setup_kwargs
|
dict
|
Keyword arguments passed to |
None
|
Returns:
| Type | Description |
|---|---|
Project
|
Retrieved project entity. |
import_project
Import a project entity from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
str
|
Path to a YAML file containing the project descriptor. |
required |
setup_kwargs
|
dict
|
Keyword arguments passed to |
None
|
reset_id
|
bool
|
Whether to generate a new entity identifier instead of preserving the identifier from the imported project. |
False
|
Returns:
| Type | Description |
|---|---|
Project
|
Imported project entity. |
load_project
Load a project entity from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
str
|
Path to a YAML file containing the project descriptor. |
required |
setup_kwargs
|
dict
|
Keyword arguments passed to |
None
|
Returns:
| Type | Description |
|---|---|
Project
|
Loaded project entity. |
Update
Update a project after changing its mutable metadata.
update_project
Update a project entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity
|
Project
|
Entity to update. The entity specification is immutable. |
required |
Returns:
| Type | Description |
|---|---|
Project
|
Updated project entity. |
Delete
Delete a project from the backend.
delete_project
Delete a project entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Project name. |
required |
cascade
|
bool
|
Whether to request cascade deletion from the backend. |
True
|
clean_context
|
bool
|
Whether to delete the project's local context. |
True
|
Returns:
| Type | Description |
|---|---|
dict
|
Response data from the backend. |