Skip to content

Models

The Pydantic entity models nested inside responses. Fields are snake_case with camelCase aliases, and everything is optional, so only the fields a query actually requested are populated.

Pydantic models for Linear API entities.

All models use snake_case attribute names with automatically generated camelCase aliases, so they parse the API's camelCase payloads (displayName, createdAt, …) and can be serialised back to them with model_dump(by_alias=True). Because populate_by_name=True, you can construct them with either spelling.

Only the fields a given query requested are populated; everything is optional and defaults to None, and unknown fields are ignored.

LinearModel

Bases: BaseModel

Base model: camelCase aliases, snake_case attributes, lenient parsing.

PageInfo

Bases: LinearModel

Relay-style pagination metadata for a connection.

User

Bases: LinearModel

A Linear user.

Team

Bases: LinearModel

A Linear team.

Issue

Bases: LinearModel

A Linear issue, with nested relations populated when requested.

IssueDetail

Bases: Issue

An issue plus its heavier related data, returned by issue_details.

Inherits every field of Issue and adds the related collections. As always, only the fields the query requested are populated; parent, children, and relation targets are shallow issues.

Project

Bases: LinearModel

A Linear project.

Comment

Bases: LinearModel

A comment on an issue.

WorkflowState

Bases: LinearModel

An issue workflow state (e.g. Todo, In Progress, Done).

IssueLabel

Bases: LinearModel

A label that can be applied to issues.

Attachment

Bases: LinearModel

A link or file attached to an issue.

Cycle

Bases: LinearModel

A team cycle (sprint).

IssueRelation

Bases: LinearModel

A relation from an issue to another (e.g. blocks, related, duplicate).