Annotation Queues#

class AnnotationQueuesClient(*, sdk_config: SDKConfiguration, generated_client: ApiClient)[source]#

Bases: object

Client for managing annotation queues.

Supports creation, retrieval, update, deletion, and record management.

This class is primarily intended for internal use within the SDK. Users are highly encouraged to access resource-specific functionality via arize.ArizeClient.

The annotation queues client is a thin wrapper around the generated REST API client, using the shared generated API client owned by arize.config.SDKConfiguration.

Parameters:
  • sdk_config (SDKConfiguration) – Resolved SDK configuration.

  • generated_client (ApiClient) – Shared generated API client instance.

list(*, space: str | None = None, name: str | None = None, limit: int = 100, cursor: str | None = None) AnnotationQueuesList200Response[source]#

List annotation queues the user has access to.

Annotation queues are returned in descending creation order (most recently created first).

Parameters:
  • space (str | None) – Optional space filter. If the value is a base64-encoded resource ID it is treated as a space ID; otherwise it is used as a case-insensitive substring filter on the space name.

  • name (str | None) – Optional name substring to filter results.

  • limit (int) – Maximum number of annotation queues to return. The server enforces an upper bound.

  • cursor (str | None) – Opaque pagination cursor returned from a previous response.

Returns:

A response object with the annotation queues and pagination information.

Raises:

ApiException – If the REST API returns an error response (e.g. 400/401/403/429).

Return type:

AnnotationQueuesList200Response

get(*, annotation_queue: str, space: str | None = None) AnnotationQueue[source]#

Get an annotation queue by ID or name.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

Returns:

The annotation queue object.

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 401/403/404/429).

Return type:

AnnotationQueue

create(*, name: str, space: str, annotation_config_ids: builtins.list[str], annotator_emails: builtins.list[str], instructions: str | None = None, assignment_method: AssignmentMethod | None = None, record_sources: builtins.list[AnnotationQueueRecordInput] | None = None) AnnotationQueue[source]#

Create an annotation queue.

Parameters:
  • name (str) – Annotation queue name (must be unique within the target space, max 255 characters).

  • space (str) – Space ID or name to create the annotation queue in.

  • annotation_config_ids (builtins.list[str]) – IDs of annotation configs to associate with the queue (at least one required).

  • annotator_emails (builtins.list[str]) – Emails of users to assign as annotators (at least one required). All users must have active accounts with access to the space.

  • instructions (str | None) – Optional instructions for annotators (max 5000 characters).

  • assignment_method (AssignmentMethod | None) – How records are assigned to annotators. Defaults to ALL (every annotator sees every record).

  • record_sources (builtins.list[AnnotationQueueRecordInput] | None) – Optional initial record sources to populate the queue (at most 2 sources per request).

Returns:

The created annotation queue object as returned by the API.

Raises:
  • NotFoundError – If the space name cannot be resolved to an ID.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/409/429).

Return type:

AnnotationQueue

update(*, annotation_queue: str, space: str | None = None, name: str | None = None, instructions: str | None = None, annotation_config_ids: builtins.list[str] | None = None, annotator_emails: builtins.list[str] | None = None) AnnotationQueue[source]#

Update an annotation queue.

Only the fields passed are updated. At least one field must be provided. List fields (annotation_config_ids, annotator_emails) fully replace the existing values when provided.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

  • name (str | None) – New name for the queue (must remain unique within the space).

  • instructions (str | None) – New instructions for annotators. Pass an empty string to clear existing instructions.

  • annotation_config_ids (builtins.list[str] | None) – Full replacement list of annotation config IDs. Pass an empty list to clear.

  • annotator_emails (builtins.list[str] | None) – Full replacement list of annotator emails. Pass an empty list to clear.

Returns:

The updated annotation queue object as returned by the API.

Raises:
  • ValueError – If no fields to update are provided.

  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/404/409/429).

Return type:

AnnotationQueue

delete(*, annotation_queue: str, space: str | None = None) None[source]#

Delete an annotation queue by ID or name.

This operation is irreversible.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

Returns:

This method returns None on success (HTTP 204 No Content).

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 401/403/404/429).

Return type:

None

list_records(*, annotation_queue: str, space: str | None = None, limit: int = 100, cursor: str | None = None) AnnotationQueueRecordsList200Response[source]#

List records in an annotation queue.

Each record includes its data as flat key-value pairs, any annotations that have been added, and the users assigned to annotate it.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

  • limit (int) – Maximum number of records to return (server enforces an upper bound of 500).

  • cursor (str | None) – Opaque pagination cursor returned from a previous response.

Returns:

A response object with the records and pagination information.

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 401/403/404/429).

Return type:

AnnotationQueueRecordsList200Response

add_records(*, annotation_queue: str, space: str | None = None, record_sources: builtins.list[AnnotationQueueRecordInput]) AnnotationQueuesRecordsCreate200Response[source]#

Add records to an annotation queue.

Records may come from spans (a project time range) or dataset examples. At most 2 record sources and 500 total records may be added per request.

Parameters:
Returns:

A response object containing the created record sources.

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/404/429).

Return type:

AnnotationQueuesRecordsCreate200Response

delete_records(*, annotation_queue: str, space: str | None = None, record_ids: builtins.list[str]) None[source]#

Delete records from an annotation queue.

Record IDs that are not found or do not belong to the specified queue are silently ignored. A successful response does not guarantee all provided IDs were deleted.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

  • record_ids (builtins.list[str]) – IDs of records to delete (1-100 IDs per request).

Returns:

This method returns None on success (HTTP 204 No Content).

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/404/429).

Return type:

None

annotate_record(*, annotation_queue: str, space: str | None = None, record_id: str, annotations: builtins.list[AnnotationInput]) AnnotationQueueRecordAnnotateResult[source]#

Submit annotations for an annotation queue record.

Annotations are upserted by annotation config name; omitted configs are left unchanged.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

  • record_id (str) – ID of the record to annotate.

  • annotations (builtins.list[AnnotationInput]) – Annotation values to upsert. Each entry targets one annotation config by name and may set a score, label, and/or text.

Returns:

A result object with the submitted annotation values.

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/404/429).

Return type:

AnnotationQueueRecordAnnotateResult

assign_record(*, annotation_queue: str, space: str | None = None, record_id: str, assigned_user_emails: builtins.list[str]) AnnotationQueueRecordAssignResult[source]#

Assign users to an annotation queue record.

Fully replaces the current record-level user assignment. Pass an empty list to remove all assignments.

Parameters:
  • annotation_queue (str) – Annotation queue ID or name. If a name is provided, space is required for resolution.

  • space (str | None) – Space ID or name. Required when annotation_queue is a name so it can be resolved to an ID.

  • record_id (str) – ID of the record to assign users to.

  • assigned_user_emails (builtins.list[str]) – Emails of users to assign (at most 100). Replaces all existing record-level assignments.

Returns:

A result object with the updated user assignments.

Raises:
  • NotFoundError – If the annotation queue name cannot be resolved.

  • ApiException – If the REST API returns an error response (e.g. 400/401/403/404/429).

Return type:

AnnotationQueueRecordAssignResult

Response Types#

class AnnotationInput(*, name: Annotated[str, Strict(strict=True)], score: Annotated[float, Strict(strict=True)] | Annotated[int, Strict(strict=True)] | None = None, label: Annotated[str, Strict(strict=True)] | None = None, text: Annotated[str, Strict(strict=True)] | None = None)[source]#

Bases: BaseModel

An annotation value to set on a record, identified by its annotation config name. Omitting a field leaves the existing value unchanged.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
name: StrictStr#
score: StrictFloat | StrictInt | None#
label: StrictStr | None#
text: StrictStr | None#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationInput from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationInput from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueue(*, id: Annotated[str, Strict(strict=True)], name: Annotated[str, Strict(strict=True)], space_id: Annotated[str, Strict(strict=True)], instructions: Annotated[str, Strict(strict=True)] | None = None, annotation_configs: List[AnnotationConfig] | None = None, annotators: List[AnnotatorUser], created_at: datetime, updated_at: datetime)[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
id: StrictStr#
name: StrictStr#
space_id: StrictStr#
instructions: StrictStr | None#
annotation_configs: List[AnnotationConfig] | None#
annotators: List[AnnotatorUser]#
created_at: datetime#
updated_at: datetime#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueue from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueue from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueueExampleRecordInput(*, record_type: Annotated[str, Strict(strict=True)], dataset_id: Annotated[str, Strict(strict=True)], dataset_version_id: Annotated[str, Strict(strict=True)] | None = None, example_ids: List[Annotated[str, Strict(strict=True)]] | None = None)[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
record_type: StrictStr#
dataset_id: StrictStr#
dataset_version_id: StrictStr | None#
example_ids: List[StrictStr] | None#
classmethod record_type_validate_enum(value)[source]#

Validates the enum

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueueExampleRecordInput from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueueExampleRecordInput from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueueRecordAnnotateResult(*, id: Annotated[str, Strict(strict=True)], annotation_queue_id: Annotated[str, Strict(strict=True)], source_type: Annotated[str, Strict(strict=True)], annotations: List[Annotation])[source]#

Bases: BaseModel

A snapshot of the annotation queue record fields that were modified by an annotate operation. Only the record identity fields and the submitted annotations are returned. Evaluations and user assignments are not fetched and are not included in this response for performance reasons; use the list records endpoint to retrieve the full record state.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
id: StrictStr#
annotation_queue_id: StrictStr#
source_type: StrictStr#
annotations: List[Annotation]#
classmethod source_type_validate_enum(value)[source]#

Validates the enum

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueueRecordAnnotateResult from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueueRecordAnnotateResult from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueueRecordAssignResult(*, id: Annotated[str, Strict(strict=True)], annotation_queue_id: Annotated[str, Strict(strict=True)], source_type: Annotated[str, Strict(strict=True)], assigned_users: List[AnnotationQueueAssignedUser])[source]#

Bases: BaseModel

A snapshot of the annotation queue record fields that were modified by an assign operation. Only the record identity fields and the resulting user assignments are returned. Annotations and evaluations are not fetched and are not included in this response for performance reasons; use the list records endpoint to retrieve the full record state.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • id (Annotated[str, Strict(strict=True)])

  • annotation_queue_id (Annotated[str, Strict(strict=True)])

  • source_type (Annotated[str, Strict(strict=True)])

  • assigned_users (List[AnnotationQueueAssignedUser])

id: StrictStr#
annotation_queue_id: StrictStr#
source_type: StrictStr#
assigned_users: List[AnnotationQueueAssignedUser]#
classmethod source_type_validate_enum(value)[source]#

Validates the enum

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueueRecordAssignResult from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueueRecordAssignResult from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueueRecordInput(*args, oneof_schema_1_validator: AnnotationQueueExampleRecordInput | None = None, oneof_schema_2_validator: AnnotationQueueSpanRecordInput | None = None, actual_instance: AnnotationQueueExampleRecordInput | AnnotationQueueSpanRecordInput | None = None, one_of_schemas: Set[str] = {'AnnotationQueueExampleRecordInput', 'AnnotationQueueSpanRecordInput'}, discriminator_value_class_map: Dict[str, str] = {})[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
oneof_schema_1_validator: AnnotationQueueExampleRecordInput | None#
oneof_schema_2_validator: AnnotationQueueSpanRecordInput | None#
actual_instance: AnnotationQueueExampleRecordInput | AnnotationQueueSpanRecordInput | None#
one_of_schemas: Set[str]#
model_config: ClassVar[ConfigDict] = {'protected_namespaces': (), 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

discriminator_value_class_map: Dict[str, str]#
classmethod actual_instance_must_validate_oneof(v)[source]#
classmethod from_dict(obj: str | Dict[str, Any]) Self[source]#
Parameters:

obj (str | Dict[str, Any])

Return type:

Self

classmethod from_json(json_str: str) Self[source]#

Returns the object represented by the json string

Parameters:

json_str (str)

Return type:

Self

to_json() str[source]#

Returns the JSON representation of the actual instance

Return type:

str

to_dict() Dict[str, Any] | AnnotationQueueExampleRecordInput | AnnotationQueueSpanRecordInput | None[source]#

Returns the dict representation of the actual instance

Return type:

Dict[str, Any] | AnnotationQueueExampleRecordInput | AnnotationQueueSpanRecordInput | None

to_str() str[source]#

Returns the string representation of the actual instance

Return type:

str

class AnnotationQueueRecordsList200Response(*, records: List[AnnotationQueueRecord], pagination: PaginationMetadata)[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • records (List[AnnotationQueueRecord])

  • pagination (PaginationMetadata)

records: List[AnnotationQueueRecord]#
pagination: PaginationMetadata#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueueRecordsList200Response from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueueRecordsList200Response from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

to_df(by_alias: bool = False, exclude_none: str | bool = True, json_normalize: bool = False, convert_dtypes: bool = True, expand_field: str = 'additional_properties', expand_prefix: str = '') pd.DataFrame#

Convert a list of objects to a pandas.DataFrame.

Behavior:
  • If an item is a Pydantic v2 model, use .model_dump(by_alias=…).

  • If an item is a mapping (dict-like), use it as-is.

  • Otherwise, raise a ValueError (unsupported row type).

Parameters:
  • self (object) – The object instance containing the field to convert.

  • by_alias (bool) – Use field aliases when dumping Pydantic models.

  • exclude_none (str | bool) – Control None/NaN column dropping. - False: keep Nones as-is - “all”: drop columns where all values are None/NaN - “any”: drop columns where any value is None/NaN - True: alias for “all”

  • json_normalize (bool) – If True, flatten nested dicts via pandas.json_normalize.

  • convert_dtypes (bool) – If True, call DataFrame.convert_dtypes() at the end.

  • expand_field (str) – If set, look for this field in each row and

  • columns. (expand its keys into top-level)

  • expand_prefix (str) – If set, prefix expanded column names with this string.

Returns:

The converted DataFrame.

Return type:

pandas.DataFrame

class AnnotationQueueSpanRecordInput(*, record_type: Annotated[str, Strict(strict=True)], project_id: Annotated[str, Strict(strict=True)], start_time: datetime, end_time: datetime, span_ids: Annotated[List[Annotated[str, Strict(strict=True)]], MinLen(min_length=1)])[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
record_type: StrictStr#
project_id: StrictStr#
start_time: datetime#
end_time: datetime#
span_ids: Annotated[List[StrictStr], Field(min_length=1)]#
classmethod record_type_validate_enum(value)[source]#

Validates the enum

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueueSpanRecordInput from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueueSpanRecordInput from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AnnotationQueuesList200Response(*, annotation_queues: List[AnnotationQueue], pagination: PaginationMetadata)[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
annotation_queues: List[AnnotationQueue]#
pagination: PaginationMetadata#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueuesList200Response from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueuesList200Response from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

to_df(by_alias: bool = False, exclude_none: str | bool = True, json_normalize: bool = False, convert_dtypes: bool = True, expand_field: str = 'additional_properties', expand_prefix: str = '') pd.DataFrame#

Convert a list of objects to a pandas.DataFrame.

Behavior:
  • If an item is a Pydantic v2 model, use .model_dump(by_alias=…).

  • If an item is a mapping (dict-like), use it as-is.

  • Otherwise, raise a ValueError (unsupported row type).

Parameters:
  • self (object) – The object instance containing the field to convert.

  • by_alias (bool) – Use field aliases when dumping Pydantic models.

  • exclude_none (str | bool) – Control None/NaN column dropping. - False: keep Nones as-is - “all”: drop columns where all values are None/NaN - “any”: drop columns where any value is None/NaN - True: alias for “all”

  • json_normalize (bool) – If True, flatten nested dicts via pandas.json_normalize.

  • convert_dtypes (bool) – If True, call DataFrame.convert_dtypes() at the end.

  • expand_field (str) – If set, look for this field in each row and

  • columns. (expand its keys into top-level)

  • expand_prefix (str) – If set, prefix expanded column names with this string.

Returns:

The converted DataFrame.

Return type:

pandas.DataFrame

class AnnotationQueuesRecordsCreate200Response(*, record_sources: List[AnnotationQueueRecord])[source]#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

record_sources (List[AnnotationQueueRecord])

record_sources: List[AnnotationQueueRecord]#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AnnotationQueuesRecordsCreate200Response from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

to_dict() Dict[str, Any][source]#

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AnnotationQueuesRecordsCreate200Response from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AssignmentMethod(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

How records are assigned to annotators. Defaults to “all”. - all: Every annotator is assigned to every record. - random: Each record is randomly assigned to one annotator.

ALL = 'all'#
RANDOM = 'random'#
classmethod from_json(json_str: str) Self[source]#

Create an instance of AssignmentMethod from a JSON string

Parameters:

json_str (str)

Return type:

Self