Skip to main content

Python SDK for Draft — AI-powered kanban board for autonomous code delivery

Project description

Draft SDK

Python SDK for Draft — the AI-powered kanban board for autonomous code delivery.

Install

pip install draft-sdk

Quick Start

from draft_sdk import DraftClient

client = DraftClient("http://localhost:8000")

# One-liner: create goal → generate tickets → execute → wait for completion
result = client.run_goal("Add dark mode support", auto_approve=True, wait=True)
print(f"Status: {result.status}, Tickets: {len(result.tickets)}")

Granular Control

from draft_sdk import DraftClient

client = DraftClient("http://localhost:8000")

# Create a goal
goal = client.goals.create(title="Add user auth", board_id="your-board-id")

# Generate tickets from the goal
tickets = client.goals.generate_tickets(goal.id)

# Approve specific tickets
good = [t.id for t in tickets if t.priority and t.priority >= 50]
client.tickets.accept(good)

# Execute and wait for each ticket
for tid in good:
    job = client.tickets.execute(tid)
    done = client.jobs.wait(job.id, timeout=600)
    print(f"Job {done.id}: {done.status}")

# Review revisions
for tid in good:
    revisions = client.revisions.list(tid)
    if revisions:
        diff = client.revisions.get_diff(revisions[0].id)
        client.revisions.review(revisions[0].id, decision="approved")

Progress Tracking

def on_progress(event, data):
    print(f"[{event}] {data}")

result = client.run_goal(
    "Refactor auth module",
    auto_approve=True,
    on_progress=on_progress,
)

Resources

  • client.boards — Board management
  • client.goals — Goal CRUD + ticket generation
  • client.tickets — Ticket CRUD + state transitions + execution
  • client.jobs — Job monitoring + logs + wait
  • client.revisions — Code review + diffs + comments
  • client.planner — Autopilot control

Documentation

Full docs at docs.trydraft.dev/sdk/overview

License

BSL-1.1 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

draft_sdk-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

draft_sdk-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file draft_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: draft_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for draft_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f676f836c4b76fd800e6af04eebab97a074f62536dd9546289e924db43dcba5e
MD5 36894b8f74b1fbe5122fb2b6ab7a45a6
BLAKE2b-256 c699371e5cdc3373b097714ff6887a85791975604d2b403b53647ee2464b8943

See more details on using hashes here.

File details

Details for the file draft_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: draft_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for draft_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 857c6daf86b0984782f59ebc67c4386512482bb394b99f69b6f2b345d758126c
MD5 e669a4ef3e5bdf06ea5f3746fbc4891e
BLAKE2b-256 bdefd82d1b709326f56a672966c082753c2cb11242542b18bc18d5fca228f1ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page