sdk-python  by temporalio

Python SDK for Temporal, a distributed orchestration engine

Created 3 years ago
816 stars

Top 43.5% on SourcePulse

GitHubView on GitHub
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)
42
Issues (30d)
30
Star History
55 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
5 more.

activepieces by activepieces

0.8%
19k
Open-source Zapier alternative for AI workflow automation
Created 2 years ago
Updated 22 hours ago
Feedback? Help us improve.