Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 13:04
· 5 commits to main since this release
2446dc5

Added

A client for the v2 API, under client.v2 — 407 operations across 90
resources. Everything you use today is untouched: v2 is a new namespace beside
the existing surface, not a replacement for it.

There are two ways in, and they compose:

# Flat path — each segment consumes exactly one URL path id
client.v2.workspaces.projects.states.list("acme", "ENG")

# Loaded rows — a fetched row carries its ids, so nothing repeats
project = client.v2.workspaces.projects.retrieve("acme", "ENG")
project.cycles.list()
project.work_items.create(CreateWorkItem(name="Ship it"))

Path ids are named after the resource they identify, singular, with no _id
suffix: retrieve(slug, project, state).

  • Navigable rows — 19 Loaded* types. A fetched workspace reaches 25
    children, a project 19, a work item its comments, links, attachments and
    worklogs.
  • Typed projection — fields= and expand= wherever the API declares them,
    with generated Literal aliases so editors complete the valid values. Reading
    a field you did not request raises FieldNotRequested, naming what the server
    did return, so "not requested" can never be mistaken for "null".
  • Typed filters and ordering — every query filter the API declares is
    reachable, as TypedDict keyword arguments; order_by= is likewise typed.
  • Pagination — both envelopes: offset (per_page, offset) and cursor
    (cursor). iterate() follows pages on either, so the difference stays out of
    your code.
  • Lookup by name — find_by_name(...), and find_by_display_name(...) on
    property resources, so scripts can use the names people see in the UI instead
    of ids.
  • Bridges — add / remove on relationship collections, e.g.
    cycle.work_items.add([...]), up to 100 ids per call.
  • Bulk writes — bulk_create / bulk_update / bulk_delete where the API
    offers them, up to 50 items per call.
  • py.typed — the package now ships a PEP 561 marker, so type checkers see
    its annotations.

v2 exceptions, including FieldNotRequested, are importable from plane.api.v2.

Full Changelog: v0.2.24...v0.3.0