Skip to main content

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.

Metadata

Release files for draft-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for draft-sdk 0.1.0
File Size Uploaded
draft_sdk-0.1.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for draft-sdk 0.1.0
File Interpreter ABI Platform
draft_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / draft_sdk-0.1.0.tar.gz

Download URL draft_sdk-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f676f836c4b76fd800e6af04eebab97a074f62536dd9546289e924db43dcba5e
BLAKE2b-256 checksum
How to use checksums
c699371e5cdc3373b097714ff6887a85791975604d2b403b53647ee2464b8943
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / draft_sdk-0.1.0-py3-none-any.whl

Download URL draft_sdk-0.1.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
857c6daf86b0984782f59ebc67c4386512482bb394b99f69b6f2b345d758126c
BLAKE2b-256 checksum
How to use checksums
bdefd82d1b709326f56a672966c082753c2cb11242542b18bc18d5fca228f1ae
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page