Skip to main content

trigora

Python authoring SDK for Trigora durable programs.

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.0

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.0
File Interpreter ABI Platform
trigora-1.0.0-py3-none-any.whl Python 3 none any Details

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

Download URL trigora-1.0.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bb42be2d256df8652d7efeb29c6d493efe58e3d7a48f9c06886cbaa1e8ab8e3
BLAKE2b-256 checksum
How to use checksums
d9e5b60311b515d27380733ae6b57eae508e21b3a38acc853c39329d1f7dd422
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.0 This release

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