sdk-python  by temporalio

Python SDK for Temporal, a distributed orchestration engine

created 3 years ago
714 stars

Top 48.0% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This Python SDK provides a framework for building distributed, scalable, and durable applications using the Temporal orchestration engine. It targets Python developers looking to implement complex, long-running business logic with resilience and fault tolerance.

How It Works

Workflows are defined as Python classes using async def and decorated with @workflow.defn. The SDK leverages a custom asyncio event loop to ensure deterministic execution, managing tasks, timers, and cancellations within a sandboxed environment. Activities, also defined with @activity.defn, can be synchronous or asynchronous and are executed by workers. The SDK handles serialization and deserialization of data through configurable data converters, with built-in support for JSON and Pydantic models.

Quick Start & Requirements

Highlighted Details

  • Type-safe workflow and activity invocations with MyPy support.
  • Flexible activity execution with support for async def, threaded, and multiprocess activities.
  • Robust testing framework with automatic and manual time-skipping capabilities.
  • Workflow sandbox for detecting non-deterministic code, with customization options.
  • OpenTelemetry integration for metrics and tracing.

Maintenance & Community

The project is actively maintained by the Temporal team. Community support is available via Discord.

Licensing & Compatibility

MIT License. Compatible with commercial and closed-source applications.

Limitations & Caveats

The time-skipping test environment has known issues on ARM architectures. Nexus support is experimental and subject to change. Customizing the sandbox restrictions is an experimental API.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
41
Issues (30d)
14
Star History
72 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.