Skip to content

Tasks

albert.collections.tasks

BlockId module-attribute

BlockId = Annotated[str, AfterValidator(ensure_block_id)]

DataTemplateId module-attribute

DataTemplateId = Annotated[
    str, AfterValidator(ensure_datatemplate_id)
]

TaskAdapter module-attribute

TaskAdapter = TypeAdapter(TaskUnion)

TaskId module-attribute

TaskId = Annotated[str, AfterValidator(ensure_task_id)]

WorkflowId module-attribute

WorkflowId = Annotated[
    str, AfterValidator(ensure_workflow_id)
]

logger module-attribute

logger = create_logger()

AlbertHTTPError

AlbertHTTPError(response: Response)

Bases: AlbertException

Base class for all erors due to HTTP responses.

Source code in src/albert/exceptions.py
def __init__(self, response: requests.Response):
    message = self._format_message(response)
    super().__init__(message)
    self.response = response

response instance-attribute

response = response

AlbertPaginator

AlbertPaginator(
    *,
    path: str,
    mode: PaginationMode,
    session: AlbertSession,
    deserialize: Callable[
        [Iterable[dict]], Iterable[ItemType]
    ],
    params: dict[str, str] | None = None,
)

Bases: Iterator[ItemType]

Helper class for pagination through Albert endpoints.

Two pagination modes are possible: - Offset-based via by the offset query parameter - Key-based via by the startKey query parameter and 'lastKey' response field

A custom deserialize function is provided when additional logic is required to load the raw items returned by the search listing, e.g., making additional Albert API calls.

Source code in src/albert/core/pagination.py
def __init__(
    self,
    *,
    path: str,
    mode: PaginationMode,
    session: AlbertSession,
    deserialize: Callable[[Iterable[dict]], Iterable[ItemType]],
    params: dict[str, str] | None = None,
):
    self.path = path
    self.mode = mode
    self.session = session
    self.deserialize = deserialize

    params = params or {}
    self.params = {k: v for k, v in params.items() if v is not None}

    if "startKey" in self.params:
        self.params["startKey"] = quote_plus(self.params["startKey"])

    self._iterator = self._create_iterator()

deserialize instance-attribute

deserialize = deserialize

mode instance-attribute

mode = mode

params instance-attribute

params = {k: _qfor (k, v) in items() if v is not None}

path instance-attribute

path = path

session instance-attribute

session = session

AlbertSession

AlbertSession(
    *,
    base_url: str,
    token: str | None = None,
    auth_manager: AlbertClientCredentials
    | AlbertSSOClient
    | None = None,
    retries: int | None = None,
)

Bases: Session

A session that has a base URL, which is prefixed to all request URLs.

Parameters:

Name Type Description Default
base_url str

The base URL to prefix to all relative request paths (e.g., "https://app.albertinvent.com").

required
token str | None

A static JWT token for authentication. Ignored if auth_manager is provided.

None
auth_manager AlbertClientCredentials | AlbertSSOClient

An authentication manager used to dynamically fetch and refresh tokens. If provided, it overrides token.

None
retries int

The number of automatic retries on failed requests (default is 3).

None

Methods:

Name Description
request
Source code in src/albert/core/session.py
def __init__(
    self,
    *,
    base_url: str,
    token: str | None = None,
    auth_manager: AlbertClientCredentials | AlbertSSOClient | None = None,
    retries: int | None = None,
):
    super().__init__()
    self.base_url = base_url
    self.headers.update(
        {
            "Content-Type": "application/json",
            "Accept": "application/json",
            "User-Agent": f"albert-SDK V.{albert.__version__}",
        }
    )

    if token is None and auth_manager is None:
        raise ValueError("Either `token` or `auth_manager` must be specified.")

    self._auth_manager = auth_manager
    self._provided_token = token

    # Set up retry logic
    retries = retries if retries is not None else 3
    retry = Retry(
        total=retries,
        read=retries,
        connect=retries,
        backoff_factor=0.3,
        status_forcelist=(500, 502, 503, 504, 403),
        raise_on_status=False,
    )
    adapter = HTTPAdapter(max_retries=retry)
    self.mount("http://", adapter)
    self.mount("https://", adapter)

base_url instance-attribute

base_url = base_url

request

request(
    method: str, path: str, *args, **kwargs
) -> Response
Source code in src/albert/core/session.py
def request(self, method: str, path: str, *args, **kwargs) -> requests.Response:
    self.headers["Authorization"] = f"Bearer {self._access_token}"
    full_url = urljoin(self.base_url, path) if not path.startswith("http") else path
    with handle_http_errors():
        response = super().request(method, full_url, *args, **kwargs)
        response.raise_for_status()
        return response

BaseCollection

BaseCollection(*, session: AlbertSession)

BaseCollection is the base class for all collection classes.

Parameters:

Name Type Description Default
session AlbertSession

The Albert API Session instance.

required
Source code in src/albert/collections/base.py
def __init__(self, *, session: AlbertSession):
    self.session = session

session instance-attribute

session = session

BaseTask

Bases: BaseTaggedResource

Base class for all task types. Use PropertyTask, BatchTask, or GeneralTask for specific task types.

assigned_to class-attribute instance-attribute

assigned_to: SerializeAsEntityLink[User] | None = Field(
    default=None, alias="AssignedTo"
)

category instance-attribute

category: TaskCategory

claimed_date class-attribute instance-attribute

claimed_date: str | None = Field(
    alias="claimedDate", default=None
)

closed_date class-attribute instance-attribute

closed_date: str | None = Field(
    alias="closedDate", default=None
)

completed_date class-attribute instance-attribute

completed_date: str | None = Field(
    alias="completedDate", default=None
)

due_date class-attribute instance-attribute

due_date: str | None = Field(alias='dueDate', default=None)

id class-attribute instance-attribute

id: str | None = Field(alias='albertId', default=None)

inventory_information class-attribute instance-attribute

inventory_information: list[TaskInventoryInformation] = (
    Field(alias="Inventories", default=None)
)

location class-attribute instance-attribute

location: SerializeAsEntityLink[Location] | None = Field(
    default=None, alias="Location"
)

metadata class-attribute instance-attribute

metadata: dict[str, MetadataItem] = Field(
    alias="Metadata", default_factory=dict
)

name instance-attribute

name: str

notes class-attribute instance-attribute

notes: str | None = Field(default=None)

page_state class-attribute instance-attribute

page_state: PageState | None = Field(
    alias="PageState", default=None
)

parent_id class-attribute instance-attribute

parent_id: str | None = Field(
    alias="parentId", default=None
)

pass_fail class-attribute instance-attribute

pass_fail: bool | None = Field(
    alias="passOrFail", default=None
)

priority class-attribute instance-attribute

priority: TaskPriority | None = Field(default=None)

project class-attribute instance-attribute

project: (
    SerializeAsEntityLink[Project]
    | list[SerializeAsEntityLink[Project]]
    | None
) = Field(default=None, alias="Project")

result class-attribute instance-attribute

result: str | None = Field(default=None)

security_class class-attribute instance-attribute

security_class: SecurityClass | None = Field(
    alias="class", default=None
)

sources class-attribute instance-attribute

sources: list[TaskSource] | None = Field(
    default_factory=list, alias="Sources"
)

start_date class-attribute instance-attribute

start_date: str | None = Field(
    alias="startDate", default=None
)

state class-attribute instance-attribute

state: TaskState | None = Field(default=None)

BatchTask

Bases: BaseTask

Represents a batch task.

This class is used to create and manage batch tasks. It includes the base task attributes and additional attributes specific to batch tasks.

Attributes:

Name Type Description
name str

The name of the batch task.

inventory_information list[TaskInventoryInformation]

Information about the inventory associated with the batch task.

location SerializeAsEntityLink[Location]

The location where the batch task is performed.

parent_id str

The ID of the parent project.

id (str, optional)

The ID of the batch task, by default None.

batch_size_unit (str, optional)

The unit of measurement for the batch size, by default None.

metadata (dict[str, MetadataItem], optional)

Metadata associated with the batch task, by default an empty dictionary.

workflows (list[SerializeAsEntityLink[Workflow]], optional)

A list of workflows associated with the batch task, by default None.

due_date (str, optional)

The due date of the batch task. YYY-MM-DD format, by default None.

notes (str, optional)

Notes associated with the batch task, by default None.

priority (TaskPriority, optional)

The priority of the batch task, by default None.

project (SerializeAsEntityLink[Project] | list[SerializeAsEntityLink[Project]], optional)

The project(s) associated with the batch task, by default None.

assigned_to (SerializeAsEntityLink[User], optional)

The user assigned to the batch task, by default None.

state (TaskState, optional)

The state of the batch task, by default None.

sources (list[TaskSource], optional)

A list of sources associated with the batch task, by default an empty list.

security_class (SecurityClass, optional)

The security class of the batch task, by default None.

pass_fail (bool, optional)

Whether the batch task is pass/fail, by default None.

start_date str, read only

The start date of the batch task, by default None.

claimed_date str, read only

The claimed date of the batch task, by default None.

completed_date str, read only

The completed date of the batch task, by default None.

closed_date str, read only

The closed date of the batch task, by default None.

qc_task (bool, optional)

Whether the batch task is a QC task, by default None.

batch_task_id (str, optional)

The ID of the batch task, by default None.

target (str, optional)

The target of the batch task, by default None.

qc_task_data (list[QCTaskData], optional)

A list of QC task data associated with the batch task, by default None.

batch_size_unit class-attribute instance-attribute

batch_size_unit: BatchSizeUnit | None = Field(
    alias="batchSizeUnit", default=None
)

batch_task_id class-attribute instance-attribute

batch_task_id: str | None = Field(
    alias="batchTaskId", default=None
)

category class-attribute instance-attribute

category: Literal[BATCH, BATCH_WITH_QC] = BATCH

qc_task class-attribute instance-attribute

qc_task: bool | None = Field(alias='qcTask', default=None)

qc_task_data class-attribute instance-attribute

qc_task_data: list[QCTaskData] | None = Field(
    alias="QCTaskData", default=None
)

target class-attribute instance-attribute

target: str | None = Field(default=None)

workflows class-attribute instance-attribute

workflows: list[SerializeAsEntityLink[Workflow]] | None = (
    Field(alias="Workflow", default=None)
)

GeneralTask

Bases: BaseTask

category class-attribute instance-attribute

category: Literal[GENERAL] = GENERAL

HistoryEntity

Bases: str, Enum

WORKFLOW class-attribute instance-attribute

WORKFLOW = 'workflow'

OrderBy

Bases: str, Enum

ASCENDING class-attribute instance-attribute

ASCENDING = 'asc'

DESCENDING class-attribute instance-attribute

DESCENDING = 'desc'

PaginationMode

Bases: str, Enum

KEY class-attribute instance-attribute

KEY = 'key'

OFFSET class-attribute instance-attribute

OFFSET = 'offset'

PropertyTask

Bases: BaseTask

Represents a batch task.

This class is used to create and manage batch tasks. It includes the base task attributes and additional attributes specific to batch tasks.

Attributes:

Name Type Description
name str

The name of the batch task.

inventory_information list[TaskInventoryInformation]

Information about the inventory associated with the batch task.

location SerializeAsEntityLink[Location]

The location where the batch task is performed.

parent_id str

The ID of the parent project.

blocks list[Block]

A list of blocks associated with the batch task.

id (str, optional)

The ID of the batch task, by default None.

metadata (dict[str, MetadataItem], optional)

Metadata associated with the batch task, by default an empty dictionary.

due_date (str, optional)

The due date of the batch task. YYY-MM-DD format, by default None.

notes (str, optional)

Notes associated with the batch task, by default None.

priority (TaskPriority, optional)

The priority of the batch task, by default None.

assigned_to (SerializeAsEntityLink[User], optional)

The user assigned to the batch task, by default None.

state (TaskState, optional)

The state of the batch task, by default None.

sources (list[TaskSource], optional)

A list of sources associated with the batch task, by default an empty list.

security_class (SecurityClass, optional)

The security class of the batch task, by default None.

start_date str, read only

The start date of the batch task, by default None.

claimed_date str, read only

The claimed date of the batch task, by default None.

completed_date str, read only

The completed date of the batch task, by default None.

closed_date str, read only

The closed date of the batch task, by default None.

batch_task_id class-attribute instance-attribute

batch_task_id: str | None = Field(
    alias="batchTaskId", default=None
)

blocks class-attribute instance-attribute

blocks: list[Block] | None = Field(
    alias="Blocks", default=None
)

category class-attribute instance-attribute

category: Literal[PROPERTY] = PROPERTY

qc_task class-attribute instance-attribute

qc_task: bool | None = Field(alias='qcTask', default=None)

target class-attribute instance-attribute

target: str | None = Field(default=None)

TaskCollection

TaskCollection(*, session: AlbertSession)

Bases: BaseCollection

TaskCollection is a collection class for managing Task entities in the Albert platform.

Parameters:

Name Type Description Default
session AlbertSession

The Albert Session information

required

Methods:

Name Description
add_block

Add a block to a Property task.

create

Create a new task. Tasks can be of different types, such as PropertyTask, and are created using the provided task object.

delete

Delete a task.

get_all

Retrieve fully hydrated Task entities with optional filters.

get_by_id

Retrieve a task by its ID.

get_history
remove_block

Remove a block from a Property task.

search

Search for Task matching the provided criteria.

update

Update a task.

update_block_workflow

Update the workflow of a specific block within a task.

Source code in src/albert/collections/tasks.py
def __init__(self, *, session: AlbertSession):
    """Initialize the TaskCollection.

    Parameters
    ----------
    session : AlbertSession
        The Albert Session information
    """
    super().__init__(session=session)
    self.base_path = f"/api/{TaskCollection._api_version}/tasks"

base_path instance-attribute

base_path = f'/api/{_api_version}/tasks'

add_block

add_block(
    *,
    task_id: TaskId,
    data_template_id: DataTemplateId,
    workflow_id: WorkflowId,
) -> None

Add a block to a Property task.

Parameters:

Name Type Description Default
task_id TaskId

The ID of the task to add the block to.

required
data_template_id DataTemplateId

The ID of the data template to use for the block.

required
workflow_id WorkflowId

The ID of the workflow to assign to the block.

required

Returns:

Type Description
None

This method does not return any value.

Source code in src/albert/collections/tasks.py
@validate_call
def add_block(
    self, *, task_id: TaskId, data_template_id: DataTemplateId, workflow_id: WorkflowId
) -> None:
    """Add a block to a Property task.

    Parameters
    ----------
    task_id : TaskId
        The ID of the task to add the block to.
    data_template_id : DataTemplateId
        The ID of the data template to use for the block.
    workflow_id : WorkflowId
        The ID of the workflow to assign to the block.

    Returns
    -------
    None
        This method does not return any value.

    """
    url = f"{self.base_path}/{task_id}"
    payload = [
        {
            "id": task_id,
            "data": [
                {
                    "operation": "add",
                    "attribute": "Block",
                    "newValue": [{"datId": data_template_id, "Workflow": {"id": workflow_id}}],
                }
            ],
        }
    ]
    self.session.patch(url=url, json=payload)

create

create(
    *, task: PropertyTask | GeneralTask | BatchTask
) -> BaseTask

Create a new task. Tasks can be of different types, such as PropertyTask, and are created using the provided task object.

Parameters:

Name Type Description Default
task PropertyTask | GeneralTask | BatchTask

The task object to create.

required

Returns:

Type Description
BaseTask

The registered task object.

Source code in src/albert/collections/tasks.py
def create(self, *, task: PropertyTask | GeneralTask | BatchTask) -> BaseTask:
    """Create a new task. Tasks can be of different types, such as PropertyTask, and are created using the provided task object.

    Parameters
    ----------
    task : PropertyTask | GeneralTask | BatchTask
        The task object to create.

    Returns
    -------
    BaseTask
        The registered task object.
    """
    payload = [task.model_dump(mode="json", by_alias=True, exclude_none=True)]
    url = f"{self.base_path}/multi?category={task.category.value}"
    if task.parent_id is not None:
        url = f"{url}&parentId={task.parent_id}"
    response = self.session.post(url=url, json=payload)
    task_data = response.json()[0]
    return TaskAdapter.validate_python(task_data)

delete

delete(*, id: TaskId) -> None

Delete a task.

Parameters:

Name Type Description Default
id TaskId

The ID of the task to delete.

required
Source code in src/albert/collections/tasks.py
@validate_call
def delete(self, *, id: TaskId) -> None:
    """Delete a task.

    Parameters
    ----------
    id : TaskId
        The ID of the task to delete.
    """
    url = f"{self.base_path}/{id}"
    self.session.delete(url)

get_all

get_all(
    *, params: TaskFilterParams | None = None
) -> Iterator[BaseTask]

Retrieve fully hydrated Task entities with optional filters.

This method returns complete entity data using get_by_id or get_by_ids. Use :meth:search for faster retrieval when you only need lightweight, partial (unhydrated) entities.

Parameters:

Name Type Description Default
params TaskFilterParams

Filter and pagination options passed to the search query.

None

Yields:

Type Description
Iterator[BaseTask]

A stream of fully hydrated Task objects (PropertyTask, BatchTask, or GeneralTask).

Source code in src/albert/collections/tasks.py
def get_all(self, *, params: TaskFilterParams | None = None) -> Iterator[BaseTask]:
    """Retrieve fully hydrated Task entities with optional filters.

    This method returns complete entity data using `get_by_id` or `get_by_ids`.
    Use :meth:`search` for faster retrieval when you only need lightweight, partial (unhydrated) entities.

    Parameters
    ----------
    params : TaskFilterParams, optional
        Filter and pagination options passed to the search query.

    Yields
    ------
    Iterator[BaseTask]
        A stream of fully hydrated Task objects (PropertyTask, BatchTask, or GeneralTask).
    """
    params = params or TaskFilterParams()

    for task in self.search(params=params):
        task_id = getattr(task, "id", None)
        if not task_id:
            continue

        try:
            yield self.get_by_id(id=task_id)
        except (AlbertHTTPError, RetryError) as e:
            logger.warning(f"Error fetching task '{id}': {e}")

get_by_id

get_by_id(*, id: TaskId) -> BaseTask

Retrieve a task by its ID.

Parameters:

Name Type Description Default
id TaskId

The ID of the task to retrieve.

required

Returns:

Type Description
BaseTask

The task object with the provided ID.

Source code in src/albert/collections/tasks.py
@validate_call
def get_by_id(self, *, id: TaskId) -> BaseTask:
    """Retrieve a task by its ID.

    Parameters
    ----------
    id : TaskId
        The ID of the task to retrieve.

    Returns
    -------
    BaseTask
        The task object with the provided ID.
    """
    url = f"{self.base_path}/multi/{id}"
    response = self.session.get(url)
    return TaskAdapter.validate_python(response.json())

get_history

get_history(
    *,
    id: TaskId,
    order: OrderBy = DESCENDING,
    limit: int = 1000,
    entity: HistoryEntity | None = None,
    blockId: str | None = None,
    startKey: str | None = None,
) -> TaskHistory
Source code in src/albert/collections/tasks.py
def get_history(
    self,
    *,
    id: TaskId,
    order: OrderBy = OrderBy.DESCENDING,
    limit: int = 1000,
    entity: HistoryEntity | None = None,
    blockId: str | None = None,
    startKey: str | None = None,
) -> TaskHistory:
    params = {
        "limit": limit,
        "orderBy": OrderBy(order).value if order else None,
        "entity": entity,
        "blockId": blockId,
        "startKey": startKey,
    }
    url = f"{self.base_path}/{id}/history"
    response = self.session.get(url, params=params)
    return TaskHistory(**response.json())

remove_block

remove_block(*, task_id: TaskId, block_id: BlockId) -> None

Remove a block from a Property task.

Parameters:

Name Type Description Default
task_id str

ID of the Task to remove the block from (e.g., TASFOR1234)

required
block_id str

ID of the Block to remove (e.g., BLK1)

required

Returns:

Type Description
None
Source code in src/albert/collections/tasks.py
@validate_call
def remove_block(self, *, task_id: TaskId, block_id: BlockId) -> None:
    """Remove a block from a Property task.

    Parameters
    ----------
    task_id : str
        ID of the Task to remove the block from (e.g., TASFOR1234)
    block_id : str
        ID of the Block to remove (e.g., BLK1)

    Returns
    -------
    None
    """
    url = f"{self.base_path}/{task_id}"
    payload = [
        {
            "id": task_id,
            "data": [
                {
                    "operation": "delete",
                    "attribute": "Block",
                    "oldValue": [block_id],
                }
            ],
        }
    ]
    self.session.patch(url=url, json=payload)

search

search(
    *, params: TaskFilterParams | None = None
) -> Iterator[TaskSearchItem]

Search for Task matching the provided criteria.

⚠️ This method returns partial (unhydrated) entities to optimize performance. To retrieve fully detailed entities, use :meth:get_all instead.

Parameters:

Name Type Description Default
params TaskFilterParams

Structured query parameters including filters, sort order, and pagination.

None

Yields:

Type Description
Iterator[BaseTask]

An iterator of matching, fully hydrated Task objects.

Source code in src/albert/collections/tasks.py
def search(self, *, params: TaskFilterParams | None = None) -> Iterator[TaskSearchItem]:
    """Search for Task matching the provided criteria.

    ⚠️ This method returns partial (unhydrated) entities to optimize performance.
    To retrieve fully detailed entities, use :meth:`get_all` instead.

    Parameters
    ----------
    params : TaskFilterParams, optional
        Structured query parameters including filters, sort order, and pagination.

    Yields
    ------
    Iterator[BaseTask]
        An iterator of matching, fully hydrated Task objects.
    """
    params = params or TaskFilterParams()

    query_params = {
        "limit": params.limit,
        "offset": params.offset,
        "order": params.order.value,
        "text": params.text,
        "sortBy": params.sort_by,
        "tags": params.tags,
        "taskId": params.task_id,
        "linkedTask": params.linked_task,
        "category": params.category,
        "albertId": params.albert_id,
        "dataTemplate": params.data_template,
        "assignedTo": params.assigned_to,
        "location": params.location,
        "priority": params.priority,
        "status": params.status,
        "parameterGroup": params.parameter_group,
        "createdBy": params.created_by,
        "projectId": params.project_id,
    }

    return AlbertPaginator(
        mode=PaginationMode.OFFSET,
        path=f"{self.base_path}/search",
        session=self.session,
        deserialize=lambda items: [
            TaskSearchItem(**item)._bind_collection(self) for item in items
        ],
        params=query_params,
    )

update

update(*, task: BaseTask) -> BaseTask

Update a task.

Parameters:

Name Type Description Default
task BaseTask

The updated Task object.

required

Returns:

Type Description
BaseTask

The updated Task object as it exists in the Albert platform.

Source code in src/albert/collections/tasks.py
def update(self, *, task: BaseTask) -> BaseTask:
    """Update a task.

    Parameters
    ----------
    task : BaseTask
        The updated Task object.

    Returns
    -------
    BaseTask
        The updated Task object as it exists in the Albert platform.
    """
    existing = self.get_by_id(id=task.id)
    patch_payload, list_metadata_updates = self._generate_adv_patch_payload(
        updated=task, existing=existing
    )
    patch_operations = patch_payload.get("data", [])

    if len(patch_operations) == 0 and len(list_metadata_updates) == 0:
        logger.info(f"Task {task.id} is already up to date")
        return task
    path = f"{self.base_path}/{task.id}"

    for datum in patch_operations:
        patch_payload = TaskPatchPayload(data=[datum], id=task.id)
        self.session.patch(
            url=path,
            json=[patch_payload.model_dump(mode="json", by_alias=True, exclude_none=True)],
        )

    # For metadata list field updates, we clear, then update
    # since duplicate attribute values are not allowed in single patch request.
    for attribute, values in list_metadata_updates.items():
        entity_links = existing.metadata.get(attribute.split(".")[1])
        old_values = [item.id if hasattr(item, "id") else item for item in entity_links]
        clear_datum = PatchDatum(
            operation=PatchOperation.DELETE, attribute=attribute, oldValue=old_values
        )
        clear_payload = TaskPatchPayload(data=[clear_datum], id=task.id)
        self.session.patch(
            url=path,
            json=[clear_payload.model_dump(mode="json", by_alias=True, exclude_none=True)],
        )
        if values:
            update_datum = PatchDatum(
                operation=PatchOperation.UPDATE,
                attribute=attribute,
                newValue=values,
                oldValue=[],
            )

            update_payload = TaskPatchPayload(data=[update_datum], id=task.id)
            self.session.patch(
                url=path,
                json=[
                    update_payload.model_dump(mode="json", by_alias=True, exclude_none=False)
                ],
            )
    return self.get_by_id(id=task.id)

update_block_workflow

update_block_workflow(
    *,
    task_id: TaskId,
    block_id: BlockId,
    workflow_id: WorkflowId,
) -> None

Update the workflow of a specific block within a task.

This method updates the workflow of a specified block within a task.

Parameters:

Name Type Description Default
task_id str

The ID of the task.

required
block_id str

The ID of the block within the task.

required
workflow_id str

The ID of the new workflow to be assigned to the block.

required

Returns:

Type Description
None

This method does not return any value.

Notes
  • The method asserts that the retrieved task is an instance of PropertyTask.
  • If the block's current workflow matches the new workflow ID, no update is performed.
  • The method handles the case where the block has a default workflow named "No Parameter Group".
Source code in src/albert/collections/tasks.py
@validate_call
def update_block_workflow(
    self, *, task_id: TaskId, block_id: BlockId, workflow_id: WorkflowId
) -> None:
    """
    Update the workflow of a specific block within a task.

    This method updates the workflow of a specified block within a task.
    Parameters
    ----------
    task_id : str
        The ID of the task.
    block_id : str
        The ID of the block within the task.
    workflow_id : str
        The ID of the new workflow to be assigned to the block.

    Returns
    -------
    None
        This method does not return any value.

    Notes
    -----
    - The method asserts that the retrieved task is an instance of `PropertyTask`.
    - If the block's current workflow matches the new workflow ID, no update is performed.
    - The method handles the case where the block has a default workflow named "No Parameter Group".
    """
    url = f"{self.base_path}/{task_id}"
    task = self.get_by_id(id=task_id)
    if not isinstance(task, PropertyTask):
        logger.error(f"Task {task_id} is not an instance of PropertyTask")
        raise TypeError(f"Task {task_id} is not an instance of PropertyTask")
    for b in task.blocks:
        if b.id != block_id:
            continue
        for w in b.workflow:
            if w.name == "No Parameter Group" and len(b.workflow) > 1:
                # hardcoded default workflow
                continue
            existing_workflow_id = w.id
    if existing_workflow_id == workflow_id:
        logger.info(f"Block {block_id} already has workflow {workflow_id}")
        return None
    patch = [
        {
            "data": [
                {
                    "operation": "update",
                    "attribute": "workflow",
                    "oldValue": existing_workflow_id,
                    "newValue": workflow_id,
                    "blockId": block_id,
                }
            ],
            "id": task_id,
        }
    ]
    self.session.patch(url=url, json=patch)

TaskFilterParams pydantic-model

Bases: BaseAlbertModel

Filtering and query parameters for searching tasks.

This model centralizes all supported filters, sorting, and pagination options used in task search operations.

Show JSON schema:
{
  "$defs": {
    "OrderBy": {
      "enum": [
        "desc",
        "asc"
      ],
      "title": "OrderBy",
      "type": "string"
    },
    "TaskCategory": {
      "enum": [
        "Property",
        "Batch",
        "General",
        "BatchWithQC"
      ],
      "title": "TaskCategory",
      "type": "string"
    }
  },
  "description": "Filtering and query parameters for searching tasks.\n\nThis model centralizes all supported filters, sorting, and pagination options\nused in task search operations.",
  "properties": {
    "order": {
      "$ref": "#/$defs/OrderBy",
      "default": "desc",
      "description": "The order in which to return results (asc or desc)."
    },
    "text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Text search across multiple task fields.",
      "title": "Text"
    },
    "sort_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Attribute to sort tasks by (e.g., createdAt, name).",
      "title": "Sort By"
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Filter by tags associated with tasks.",
      "title": "Tags"
    },
    "task_id": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Specific task IDs to search for.",
      "title": "Task Id"
    },
    "linked_task": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task IDs linked to the ones being searched.",
      "title": "Linked Task"
    },
    "category": {
      "anyOf": [
        {
          "$ref": "#/$defs/TaskCategory"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task category filter (e.g., Experiment, Analysis)."
    },
    "albert_id": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Albert-specific task identifiers.",
      "title": "Albert Id"
    },
    "data_template": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Data template IDs associated with tasks.",
      "title": "Data Template"
    },
    "assigned_to": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "User IDs assigned to the tasks.",
      "title": "Assigned To"
    },
    "location": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Locations where tasks are carried out.",
      "title": "Location"
    },
    "priority": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Priority levels for filtering tasks.",
      "title": "Priority"
    },
    "status": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task status values (e.g., Open, Done).",
      "title": "Status"
    },
    "parameter_group": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Parameter Group IDs associated with tasks.",
      "title": "Parameter Group"
    },
    "created_by": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "User IDs who created the tasks.",
      "title": "Created By"
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ID of the parent project for filtering tasks.",
      "title": "Project Id"
    },
    "limit": {
      "default": 100,
      "description": "Maximum number of results to return (default: 100).",
      "maximum": 1000,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    },
    "offset": {
      "default": 0,
      "description": "Number of results to skip for pagination (default: 0).",
      "minimum": 0,
      "title": "Offset",
      "type": "integer"
    }
  },
  "title": "TaskFilterParams",
  "type": "object"
}

Fields:

albert_id pydantic-field

albert_id: list[str] | None = None

Albert-specific task identifiers.

assigned_to pydantic-field

assigned_to: list[str] | None = None

User IDs assigned to the tasks.

category pydantic-field

category: TaskCategory | None = None

Task category filter (e.g., Experiment, Analysis).

created_by pydantic-field

created_by: list[str] | None = None

User IDs who created the tasks.

data_template pydantic-field

data_template: list[str] | None = None

Data template IDs associated with tasks.

limit pydantic-field

limit: int = 100

Maximum number of results to return (default: 100).

linked_task pydantic-field

linked_task: list[str] | None = None

Task IDs linked to the ones being searched.

location pydantic-field

location: list[str] | None = None

Locations where tasks are carried out.

offset pydantic-field

offset: int = 0

Number of results to skip for pagination (default: 0).

order pydantic-field

The order in which to return results (asc or desc).

parameter_group pydantic-field

parameter_group: list[str] | None = None

Parameter Group IDs associated with tasks.

priority pydantic-field

priority: list[str] | None = None

Priority levels for filtering tasks.

project_id pydantic-field

project_id: str | None = None

ID of the parent project for filtering tasks.

sort_by pydantic-field

sort_by: str | None = None

Attribute to sort tasks by (e.g., createdAt, name).

status pydantic-field

status: list[str] | None = None

Task status values (e.g., Open, Done).

tags pydantic-field

tags: list[str] | None = None

Filter by tags associated with tasks.

task_id pydantic-field

task_id: list[str] | None = None

Specific task IDs to search for.

text pydantic-field

text: str | None = None

Text search across multiple task fields.

TaskHistory pydantic-model

Bases: BaseAlbertModel

Show JSON schema:
{
  "$defs": {
    "AuditFields": {
      "description": "The audit fields for a resource",
      "properties": {
        "by": {
          "default": null,
          "title": "By",
          "type": "string"
        },
        "byName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Byname"
        },
        "at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        }
      },
      "title": "AuditFields",
      "type": "object"
    },
    "EntityLink": {
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "required": [
        "id"
      ],
      "title": "EntityLink",
      "type": "object"
    },
    "Location": {
      "description": "A location in Albert.\n\nAttributes\n----------\nname : str\n    The name of the location.\nid : str | None\n    The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n    The latitude of the location.\nlongitude : float\n    The longitude of the location.\naddress : str\n    The address of the location.\ncountry : str | None\n    The country code of the location. Must be two characters long.",
      "properties": {
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/Status"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Created": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Updated": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "albertId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Albertid"
        },
        "latitude": {
          "title": "Latitude",
          "type": "number"
        },
        "longitude": {
          "title": "Longitude",
          "type": "number"
        },
        "address": {
          "title": "Address",
          "type": "string"
        },
        "country": {
          "anyOf": [
            {
              "maxLength": 2,
              "minLength": 2,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Country"
        }
      },
      "required": [
        "name",
        "latitude",
        "longitude",
        "address"
      ],
      "title": "Location",
      "type": "object"
    },
    "Role": {
      "description": "A role in Albert. Note: Roles are not currently creatable via the SDK.\n\nAttributes\n----------\nname : str\n    The name of the role.\nid : str\n    The Albert ID of the role. Set when the role is retrieved from Albert.\npolicies : list[Any] | None\n    The policies associated with the role.\ntenant : str\n    The tenant ID of the role.",
      "properties": {
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/Status"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Created": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Updated": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "albertId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Albertid"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "policies": {
          "anyOf": [
            {
              "items": {},
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Policies"
        },
        "tenant": {
          "title": "Tenant",
          "type": "string"
        }
      },
      "required": [
        "name",
        "tenant"
      ],
      "title": "Role",
      "type": "object"
    },
    "Status": {
      "description": "The status of a resource",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    },
    "TaskHistoryEvent": {
      "properties": {
        "state": {
          "title": "State",
          "type": "string"
        },
        "action": {
          "title": "Action",
          "type": "string"
        },
        "actionAt": {
          "format": "date-time",
          "title": "Actionat",
          "type": "string"
        },
        "User": {
          "anyOf": [
            {
              "$ref": "#/$defs/User"
            },
            {
              "$ref": "#/$defs/EntityLink"
            }
          ],
          "title": "User"
        },
        "oldValue": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Oldvalue"
        },
        "newValue": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Newvalue"
        }
      },
      "required": [
        "state",
        "action",
        "actionAt",
        "User"
      ],
      "title": "TaskHistoryEvent",
      "type": "object"
    },
    "User": {
      "description": "Represents a User on the Albert Platform\n\nAttributes\n----------\nname : str\n    The name of the user.\nid : str | None\n    The Albert ID of the user. Set when the user is retrieved from Albert.\nlocation : Location | None\n    The location of the user.\nemail : EmailStr | None\n    The email of the user.\nroles : list[Role]\n    The roles of the user.\nuser_class : UserClass\n    The ACL class level of the user.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None",
      "properties": {
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/Status"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Created": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "Updated": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "albertId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Albertid"
        },
        "Location": {
          "anyOf": [
            {
              "$ref": "#/$defs/Location"
            },
            {
              "$ref": "#/$defs/EntityLink"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Location"
        },
        "email": {
          "default": null,
          "format": "email",
          "title": "Email",
          "type": "string"
        },
        "Roles": {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Role"
              },
              {
                "$ref": "#/$defs/EntityLink"
              }
            ]
          },
          "maxItems": 1,
          "title": "Roles",
          "type": "array"
        },
        "userClass": {
          "$ref": "#/$defs/UserClass",
          "default": "standard"
        },
        "Metadata": {
          "anyOf": [
            {
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/$defs/EntityLink"
                  },
                  {
                    "items": {
                      "$ref": "#/$defs/EntityLink"
                    },
                    "type": "array"
                  }
                ]
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        }
      },
      "required": [
        "name"
      ],
      "title": "User",
      "type": "object"
    },
    "UserClass": {
      "description": "The ACL class level of the user",
      "enum": [
        "guest",
        "standard",
        "trusted",
        "privileged",
        "admin"
      ],
      "title": "UserClass",
      "type": "string"
    }
  },
  "properties": {
    "Items": {
      "items": {
        "$ref": "#/$defs/TaskHistoryEvent"
      },
      "title": "Items",
      "type": "array"
    }
  },
  "required": [
    "Items"
  ],
  "title": "TaskHistory",
  "type": "object"
}

Fields:

items pydantic-field

items: list[TaskHistoryEvent]

TaskPatchPayload

Bases: PatchPayload

A payload for a PATCH request to update a Task.

Attributes:

Name Type Description
id str

The id of the Task to be updated.

id instance-attribute

id: str

TaskSearchItem pydantic-model

Bases: BaseAlbertModel, HydrationMixin[BaseTask]

Lightweight representation of a Task returned from unhydrated search().

Show JSON schema:
{
  "$defs": {
    "TaskSearchDataTemplate": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "TaskSearchDataTemplate",
      "type": "object"
    },
    "TaskSearchInventory": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "albertIdAndName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Albertidandname"
        }
      },
      "title": "TaskSearchInventory",
      "type": "object"
    },
    "TaskSearchLocation": {
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "TaskSearchLocation",
      "type": "object"
    },
    "TaskSearchLot": {
      "properties": {
        "number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Number"
        },
        "selectedLot": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Selectedlot"
        }
      },
      "title": "TaskSearchLot",
      "type": "object"
    },
    "TaskSearchTag": {
      "properties": {
        "tagName": {
          "title": "Tagname",
          "type": "string"
        }
      },
      "required": [
        "tagName"
      ],
      "title": "TaskSearchTag",
      "type": "object"
    },
    "TaskSearchWorkflow": {
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "category": {
          "title": "Category",
          "type": "string"
        }
      },
      "required": [
        "id",
        "category"
      ],
      "title": "TaskSearchWorkflow",
      "type": "object"
    }
  },
  "description": "Lightweight representation of a Task returned from unhydrated search().",
  "properties": {
    "albertId": {
      "title": "Albertid",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "category": {
      "title": "Category",
      "type": "string"
    },
    "priority": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Priority"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "State"
    },
    "assignedTo": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Assignedto"
    },
    "assignedToUserId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Assignedtouserid"
    },
    "createdByName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Createdbyname"
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Createdat"
    },
    "dueDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Duedate"
    },
    "completedDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Completeddate"
    },
    "startDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Startdate"
    },
    "closedDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Closeddate"
    },
    "location": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchLocation"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Location"
    },
    "inventory": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchInventory"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Inventory"
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchTag"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tags"
    },
    "lot": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchLot"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Lot"
    },
    "dataTemplate": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchDataTemplate"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Datatemplate"
    },
    "workflow": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaskSearchWorkflow"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Workflow"
    },
    "projectId": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Projectid"
    },
    "isQCTask": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Isqctask"
    },
    "parentBatchStatus": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Parentbatchstatus"
    }
  },
  "required": [
    "albertId",
    "name",
    "category"
  ],
  "title": "TaskSearchItem",
  "type": "object"
}

Fields:

assigned_to pydantic-field

assigned_to: str | None = None

assigned_to_user_id pydantic-field

assigned_to_user_id: str | None = None

category pydantic-field

category: str

closed_date pydantic-field

closed_date: str | None = None

completed_date pydantic-field

completed_date: str | None = None

created_at pydantic-field

created_at: str | None = None

created_by_name pydantic-field

created_by_name: str | None = None

data_template pydantic-field

data_template: list[TaskSearchDataTemplate] | None = None

due_date pydantic-field

due_date: str | None = None

id pydantic-field

id: TaskId

inventory pydantic-field

inventory: list[TaskSearchInventory] | None = None

is_qc_task pydantic-field

is_qc_task: bool | None = None

location pydantic-field

location: list[TaskSearchLocation] | None = None

lot pydantic-field

lot: list[TaskSearchLot] | None = None

name pydantic-field

name: str

parent_batch_status pydantic-field

parent_batch_status: str | None = None

priority pydantic-field

priority: str | None = None

project_id pydantic-field

project_id: list[str] | None = None

start_date pydantic-field

start_date: str | None = None

state pydantic-field

state: str | None = None

tags pydantic-field

tags: list[TaskSearchTag] | None = None

workflow pydantic-field

workflow: list[TaskSearchWorkflow] | None = None