Skip to content

labels

Accessed as client.orgs.labels; the async client mirrors it.

OrgsLabels

The orgs.labels namespace.

create

create(
    org: str,
    *,
    color: str,
    description: str | None = None,
    exclusive: bool | None = None,
    is_archived: bool | None = None,
    name: str,
) -> Label

Create a label for an organization.

Parameters:

Name Type Description Default
org str

name of the organization

required
color str
required
description str | None
None
exclusive bool | None
None
is_archived bool | None
None
name str
required

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgCreateLabel

delete

delete(org: str, id: int) -> None

Delete a label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgDeleteLabel

get

get(org: str, id: int) -> Label

Get a single label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to get

required

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgGetLabel

list

list(
    org: str,
    *,
    sort: Literal["mostissues", "leastissues", "reversealphabetically"] | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> Paginated[Label]

List an organization's labels.

Parameters:

Name Type Description Default
org str

name of the organization

required
sort Literal['mostissues', 'leastissues', 'reversealphabetically'] | None

Specifies the sorting method: mostissues, leastissues, or reversealphabetically.

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[Label]

LabelList.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgListLabels

update

update(
    org: str,
    id: int,
    *,
    color: str | None = None,
    description: str | None = None,
    exclusive: bool | None = None,
    is_archived: bool | None = None,
    name: str | None = None,
) -> Label

Update a label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to edit

required
color str | None
None
description str | None
None
exclusive bool | None
None
is_archived bool | None
None
name str | None
None

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgEditLabel

AsyncOrgsLabels

The orgs.labels namespace.

create

create(
    org: str,
    *,
    color: str,
    description: str | None = None,
    exclusive: bool | None = None,
    is_archived: bool | None = None,
    name: str,
) -> Label

Create a label for an organization.

Parameters:

Name Type Description Default
org str

name of the organization

required
color str
required
description str | None
None
exclusive bool | None
None
is_archived bool | None
None
name str
required

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgCreateLabel

delete

delete(org: str, id: int) -> None

Delete a label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to delete

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgDeleteLabel

get

get(org: str, id: int) -> Label

Get a single label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to get

required

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgGetLabel

list

list(
    org: str,
    *,
    sort: Literal["mostissues", "leastissues", "reversealphabetically"] | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> AsyncPaginated[Label]

List an organization's labels.

Parameters:

Name Type Description Default
org str

name of the organization

required
sort Literal['mostissues', 'leastissues', 'reversealphabetically'] | None

Specifies the sorting method: mostissues, leastissues, or reversealphabetically.

None
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[Label]

LabelList.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgListLabels

update

update(
    org: str,
    id: int,
    *,
    color: str | None = None,
    description: str | None = None,
    exclusive: bool | None = None,
    is_archived: bool | None = None,
    name: str | None = None,
) -> Label

Update a label.

Parameters:

Name Type Description Default
org str

name of the organization

required
id int

id of the label to edit

required
color str | None
None
description str | None
None
exclusive bool | None
None
is_archived bool | None
None
name str | None
None

Returns:

Type Description
Label

Label.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: orgEditLabel