Skip to main content

tidefold-client

A small Python client for starting workflow runs on a tidefold deployment, waiting for them, and reading what they produced.

pip install "tidefold-client==<your platform version>"

Install the version that matches your deployment's platform release. The client warns when it talks to a server on a different release. There is no compatibility promise across versions.

Quick start

from tidefold_client import Client

client = Client.from_env()  # TIDEFOLD_API_URL, TIDEFOLD_API_TOKEN

run = client.workflows.start(
    "invoice_review",
    inputs={"reference": "INV-1042"},
    files={"document": "invoice.pdf"},
    subject="INV-1042",
)
run.wait(timeout=1800)
print(run.results()["marked_results"])

TIDEFOLD_API_URL is the API root: https://<your host>/api on a deployment, http://localhost:8000 on a local stack. There is no default.

The API token

An administrator creates tokens under Settings → API tokens. A token is shown once; keep it in a secret store and pass it through the environment. Grant only the scopes your script needs:

Scope Needed for
workflow_read workflows.list(), workflows.get_id(), workflows.start() by name
run_create workflows.start()
run_file_write files.upload(), workflows.start() with files
run_read runs.get(), runs.wait(), runs.results(), runs.usage(), files.download()
run_cancel runs.cancel()
inbox_read runs.requests()

"Own data only" visibility suits scripts: the token then sees only the runs it started. A local stack running without auth takes no token.

The subclients

The client has one subclient per resource, all sharing one session.

client.workflows

  • start(name, *, inputs, files, subject, correlation_id) uploads each file and starts a run on the workflow's latest published release (channel="draft" runs the current draft). It returns a Run at once. workflow_id= starts by id instead of name.
  • list() returns the workflows the token can see; get_id(name) resolves a name to its stable id.

client.runs, each taking a run id

  • get() reads the run as it stands.
  • wait() polls until the run ends. It returns the run on COMPLETED and raises RunFailed, RunCancelled or WaitTimeout. A server restarting during a deploy is waited out.
  • results() returns results per step and marked_results, the outputs the workflow declares. usage(), requests() and cancel() do what their names say.

client.files

  • upload(path) declares the file, uploads it to the signed URL (never with the token) and finalizes it; it returns the file's record.
  • download(file_id, path) saves a file, such as a produced document.

A Run is client.runs with the id filled in: run.wait(), run.results() and so on. client.run(run_id) gives one for a run started earlier.

Starting is not idempotent. The client never retries start(), and calling it twice starts two runs, even with the same correlation_id.

Errors

Every exception derives from TidefoldError.

Exception Meaning
AuthError 401: token missing, wrong, expired or revoked
PermissionDenied 403: the token lacks the scope named in the message
NotFound 404: no such run or file; for a workflow, also a category the token cannot see
Conflict 409: workflow never published, or results read while the run is still running
InvalidRequest 400, 413, 422: a missing input, an oversized or unsupported file
UploadError a file did not upload; no run was started
RunFailed, RunCancelled, WaitTimeout raised by wait()
NetworkError the server could not be reached after retries

License

Apache-2.0.

Metadata

Release files for tidefold-client 0.0.226

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

Source distribution (sdist)

Source distribution for tidefold-client 0.0.226
File Size Uploaded
tidefold_client-0.0.226.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tidefold-client 0.0.226
File Interpreter ABI Platform
tidefold_client-0.0.226-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / tidefold_client-0.0.226.tar.gz

Download URL tidefold_client-0.0.226.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7db96d7c98b301766b2720e31ffebcbd24034eb041b1406126c1ef039bdd390
BLAKE2b-256 checksum
How to use checksums
b7d3985ba62d5e4c3774a5f3bdde589df52c9d6da1bdb51f3b10593f52b3b9b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / tidefold_client-0.0.226-py3-none-any.whl

Download URL tidefold_client-0.0.226-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bf7300958dc689473e538b2133ad3977cf08ec1dea90eefecebb0db8be4c232
BLAKE2b-256 checksum
How to use checksums
c93555c97710ad42bb63631c4fd6ec3e5b2f23ded99e80cdb7741abb7a2b03bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.226 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