python-temporal
Installation
SKILL.md
Temporal Workflow Orchestration
Temporal SDK patterns for durable workflows. Workflows replay, so determinism is the primary correctness constraint.
Determinism First
Workflow code must not perform network, database, filesystem, subprocess, or blocking external work. Put those effects in Activities. Use workflow.now(), workflow.random(), and workflow.uuid4() rather than ambient nondeterministic APIs. Workflows are sandboxed by default; keep workflow modules side-effect free and pass known activity/model imports through workflow.unsafe.imports_passed_through().
Worker Setup
from temporalio.client import Client
from temporalio.worker import Worker
async def main() -> None:
client = await Client.connect("localhost:7233")