Skip to main content

onetaskgraph-sdk

The typed Python client for onetaskgraph. Its request vocabulary, response models, and method surface are generated from the JSON Schema and command help emitted by the real binary; the workspace's just lint rejects committed output that has drifted.

import asyncio
from onetaskgraph_sdk import Client

tasks = asyncio.run(Client().task_list(status=["todo"]))

Each async call runs one binary subprocess and validates its JSON response. The executable is resolved in this order: the binary= constructor argument, the ONETASKGRAPH_SDK_BINARY environment variable, then the onetaskgraph executable supplied on PATH by the packaged binary distribution. Pass cwd= to select the directory from which configuration is discovered. Partial query exit status 4 is parsed and returned, so callers can inspect each typed SourceFailure; other non-zero statuses raise OnetaskgraphError with the exit code, and with the failure document the binary wrote as its failure — so a caller branches on failure.kind — or None when it wrote none. Its document is the whole failure document and answer that document's JSON; a write held by if_version to a version the item has left raises the subclass VersionMovedError, whose current_version is the version the item is at. A write that lands in part (exit 4) is returned like a partial query by default; a client built with Client(raise_on_partial=True) raises PartialWriteError for it instead — a write command only, never a read — carrying the typed answer as result (a copy's CopyReport, every item's outcome in it) and its JSON as answer.

Every call also passes --no-interactive, so no call ever waits on a prompt: a template variable nothing answers takes its default, and a required one left unanswered raises with exit code 2. template_render(file, search_path=..., answers={...}, var=[...]) hands the answers mapping to the binary on standard input, and each var (NAME=VALUE) outranks it.

task_create(source, project, title, template=..., answers={...}) and document_create(...) create an item from a template file — or from template_loader= (the path of a loader document naming what to render), or from a plain body= — and answer as task_show and document_show do; the item records its onetaskgraph.template provenance, which TemplateProvenance reads. task_render(id, ...) and document_render(id, ...) regenerate one in place from its stored answers, with answers, var and unset laid over them, and answer with a Regenerated; task_answers(id) and document_answers(id) answer with the stored TemplateAnswers. template_variables and template_render take template_loader= in place of a file. A body and answers are never passed together: both would go to the binary's one standard input, so the call raises TypeError instead.

Metadata

Release files for onetaskgraph-sdk 0.14.18

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

Source distribution (sdist)

Source distribution for onetaskgraph-sdk 0.14.18
File Size Uploaded Provenance Actions
onetaskgraph_sdk-0.14.18.tar.gz 248.0 kB Without provenance Details for onetaskgraph_sdk-0.14.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onetaskgraph-sdk 0.14.18
File Interpreter ABI Platform Actions
onetaskgraph_sdk-0.14.18-py3-none-any.whl Python 3 none any Details for onetaskgraph_sdk-0.14.18-py3-none-any.whl

Total release size: 483.3 kB

Release files / onetaskgraph_sdk-0.14.18.tar.gz

Download URL onetaskgraph_sdk-0.14.18.tar.gz
Size 248.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cd4df4b76d899279fb8f381bc0459ebda0b5a998fe05b4ca378fbe5d0b6268b2
BLAKE2b-256 checksum
How to use checksums
b7cbcdd5a73d124d5a3fa44c397bea80a3d894b7763ff12e7c18465853efa8e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / onetaskgraph_sdk-0.14.18-py3-none-any.whl

Download URL onetaskgraph_sdk-0.14.18-py3-none-any.whl
Size 235.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3c2784a9732ea44ccfb0e903a2b90099d93603fb47dfc76763863778bfaadae
BLAKE2b-256 checksum
How to use checksums
d63a357c9634df51dbacb4aeb7e0eb1fa85485a56917de9d8f56e9d9d44c0d6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for onetaskgraph-sdk 0.14.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.18 This release

2 release files No provenance

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