citrine.resources.design_execution module

Resources that represent both individual and collections of design workflow executions.

class citrine.resources.design_execution.DesignExecutionCollection(project_id: UUID, session: Session, workflow_id: UUID | None = None)

Bases: Collection[DesignExecution]

A collection of DesignExecutions.

archive(uid: UUID | str)

Archive a Design Workflow execution.

Parameters:

uid (Union[UUID, str]) – Unique identifier of the execution to archive

build(data: dict) DesignExecution

Build an individual DesignWorkflowExecution.

delete(uid: UUID | str) Response

Design Workflow Executions cannot be deleted or archived.

get(uid: UUID | str) ResourceType

Get a particular element of the collection.

list(*, per_page: int = 100) Iterator[DesignExecution]

Paginate over the elements of the collection.

Leaving page and per_page as default values will yield all elements in the collection, paginating over all available pages.

Parameters:

per_page (int, optional) – Max number of results to return per page. Default is 100. This parameter is used when making requests to the backend service. If the page parameter is specified it limits the maximum number of elements in the response.

Returns:

Resources in this collection.

Return type:

Iterator[ResourceType]

register(model: DesignExecution) DesignExecution

Cannot register an execution.

restore(uid: UUID)

Restore an archived Design Workflow execution.

Parameters:

uid (UUID) – Unique identifier of the execution to restore

trigger(execution_input: Score, *, max_candidates: int | None = None)

Trigger a Design Workflow execution given a score and a maximum number of candidates.

update(model: DesignExecution) DesignExecution

Cannot update an execution.