Skip to main content

trigora

Python authoring SDK for Trigora durable programs. Requires Python 3.10–3.14.

Build long-running programs that can call external systems, wait for events, sleep durably, invoke child executions, and recover from committed continuation state.

Install

pip install trigora

Quick example

from trigora import effect, program, wait_for_event


@program
async def approval():
    result = await effect("generate", lambda: 42)
    review = await wait_for_event("approved")
    return {"result": result, "review": review}

Run it locally with:

trigora dev
trigora start approval

Program entry

Trigora discovers programs from the paths configured in trigora.toml:

[project]
name = "my-project"
programs = ["src/**/*.py"]

Each matching file has one @program async function. That function is the program entry. The program id is the file name, so src/approval.py starts with trigora start approval.

@program
async def research(topic, depth="full"):
    return {"topic": topic, "depth": depth}

The Python frontend implements py.subset.v1.

Program parameters are plain. A default must be a constant: None, a bool, a finite number, or a string. A missing argument uses that default. Extra arguments are rejected.

*args, keyword-only parameters, and positional-only parameters are not supported.

A bare async def is not a program entry.

Durable primitives

  • effect(name, fn) — run a durable external effect
  • sleep(duration) — suspend on a durable timer
  • wait_for_event(name) — wait for an external event
  • invoke(program, input) — invoke a durable child execution
  • gather(*awaitables) — wait for every durable branch
  • race(*awaitables) — wait for the first durable branch

Effect keys and event names are string literals in the current Python subset.

Local development

trigora init
trigora dev
trigora start approval
trigora send <execution> approved --payload '"ok"'
trigora result <execution>

Programs execute through the Trigora runtime rather than by running the source file directly.

Learn more

License

MIT © 2026 Trigora, Inc.

Metadata

Release files for trigora 1.0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for trigora 1.0.1
File Interpreter ABI Platform
trigora-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / trigora-1.0.1-py3-none-any.whl

Download URL trigora-1.0.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a9f9a0b2b1b04558027dda74e0acf3063e59cb75c69aa5d0cb2d4770e15f053
BLAKE2b-256 checksum
How to use checksums
94f3f8d1b210c9e0d4751744a0ac23910062c9e35d984a54048cc0cc6495a58e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

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