Issue Category

IssueCategory model for the Labelbox Python SDK.

Uses _CamelCaseMixin (Pydantic) instead of DbObject / Updateable / Deletable because the backend’s GraphQL mutations use typed input objects incompatible with the ORM’s auto-generated mutations.

class labelbox.schema.issue_category.IssueCategory(*, id: str, name: str, description: str)[source]

Bases: _CamelCaseMixin

A category that can be assigned to issues within a project.

id

Unique identifier.

Type:

str

name

Display name.

Type:

str

description

Human-readable description.

Type:

str

delete() bool[source]

Delete this issue category.

Returns:

True when the deletion succeeds.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'description': FieldInfo(annotation=str, required=True, alias='description', alias_priority=1), 'id': FieldInfo(annotation=str, required=True, alias='id', alias_priority=1), 'name': FieldInfo(annotation=str, required=True, alias='name', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

update(name: str, description: str) IssueCategory[source]

Update this issue category.

Parameters:
  • name – New name for the category.

  • description – New description for the category.

Returns:

Updated IssueCategory instance.