Skip to main content

Tay Python SDK

tay is the stdlib-only Protocol v1 producer and worker client for a local Tay Unix-domain socket. Tay() needs no socket setting: it uses the same discovery contract as the Elixir Engine (explicit path, TAY_SOCKET_PATH, XDG runtime, TMPDIR, then /tmp/tay-<uid>). It is intentionally a separately installable package:

python -m pip install tay-client

From a Tay source checkout, use python -m pip install ./clients/python.

Create a Tay(mode="client") producer, or a Tay(mode="worker") process that only executes registered tasks. The SDK sends JSON-object arguments and bounded JSON results; it does not serialize arbitrary Python objects.

The producer surface is asynchronous: enqueue, JobHandle.status(), JobHandle.result(), and JobHandle.cancel() map directly to the currently supported Protocol v1 requests. Use a stable submission_id when retrying an enqueue whose connection outcome is unknown.

Tasks declared before await tay.start() are advertised during the handshake. For a long-running worker that adds or removes capabilities later, explicitly sync the change:

@tay.task(name="reports.rebuild.v1")
def rebuild(report_id: str) -> dict:
    return {"report_id": report_id}


await tay.register_tasks(rebuild)
# ... stop accepting new work for this task
await tay.unregister_tasks(rebuild)

Both changes are retained as desired capability state and reconciled on the next connection. client mode cannot register task capabilities.

Schedules

schedule() uses the five-field Unix cron form (minute, hour, day of month, month, day of week). Its default timezone is +00; pass a fixed UTC offset such as +02, -05, or +05:30 when the schedule should be evaluated in a different local clock. The API accepts catch_up="latest" (default) or catch_up="all", and defaults to overlap="skip".

# Every weekday at 08:00 in UTC+02.
await tay.schedule(
    "reports.rebuild.v1",
    cron="0 8 * * 1-5",
    timezone="+02",
    catch_up="latest",
)

# First run in ten minutes, then every fifteen minutes.
await tay.every("reports.rebuild.v1", minutes=15, delay=600)

Use start_at=<UTC milliseconds> instead of delay when the first occurrence has an absolute timestamp. The two options are mutually exclusive. Schedule creation, execution, and cancellation work against the current listener generation. Durable recovery/catch-up and enforced overlap policies are still pending in the Tay engine.

Run a dedicated worker module with:

tay-worker myapp.jobs

The imported module must create exactly one Tay(mode="worker") instance and register its tasks. Pass socket_path= or set TAY_SOCKET_PATH only to override automatic discovery. See the repository README for the current durable-result/ scheduling compatibility boundary.

License

The tay-client Python package is licensed under the MIT License. The Tay engine is distributed separately under the Elastic License 2.0.

Release files for tay-client 0.9.5

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

Source distribution (sdist)

Source distribution for tay-client 0.9.5
File Size Uploaded
tay_client-0.9.5.tar.gz 23.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tay-client 0.9.5
File Interpreter ABI Platform
tay_client-0.9.5-py3-none-any.whl Python 3 none any Details

Total release size: 47.2 kB

Release files / tay_client-0.9.5.tar.gz

Download URL tay_client-0.9.5.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2ab5553014d0a14a61e4082be5cf7830b485a5c3bec4306152e4b447b30fc491
BLAKE2b-256 checksum
How to use checksums
c780ce4ca23de7c3b9379fd6981aa2a340483024384044efa44eace38472bc5d
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 Sep 23, 2026.

Transparency log

Release files / tay_client-0.9.5-py3-none-any.whl

Download URL tay_client-0.9.5-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4805130bffa75f6f9584f6d2dacbe2f80e5f23f7bec427878362b35c7ad8eeaf
BLAKE2b-256 checksum
How to use checksums
a4a120153c9c9c53c438740e66ecf3b9a74364a7845b95652189195dbdc11eca
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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.9

2 release files

0.9.6

2 release files

This release

0.9.5 This release

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.7.0

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