Skip to main content

Introduction to the Temporal Python SDK

Welcome to Temporal Python SDK developer's guide!

Temporal Python SDK API reference

The Temporal Python SDK released on March 18, 2022. The Python SDK provides access to the Temporal programming model using idiomatic Python programming paradigms.

What Python programming skills and experiences are useful when using the Python SDK?

You can start working with the SDK with only Python knowledge. Temporal abstracts much of the complexity of distributed systems, but to unlock its full potential, having a broad base of knowledge will help you design more efficient and resilient systems.

We recommend that developers possess at least a moderate level of experience in practicing the following skills to develop production-level Temporal Applications:

Basic Knowledge

  • Python syntax and structure
  • Data types
  • Control Statements (Loops, Conditionals)
  • Functions
  • Decorators
  • Data Classes

Development Environment

Object-Oriented Programming

  • Classes and objects
  • Inheritance
  • Encapsulation

For complex and large-scale use cases, having some experience with the following could be helpful:

Advanced Language Features

  • Asyncio and custom asyncio event loop
  • Exception handling
  • List comprehensions
  • Type safety (with type hints or annotations)
  • Threads and concurrency

Asynchronous Programming

Testing and Debugging

  • Pytest or other testing frameworks
  • Temporal test server
  • Basic profiling and debugging
  • MyPy or other type checkers

Design Patterns

  • Dependency injections
  • Sagas

Databases

  • Familiarity with SQL or NoSQL databases
  • Database connection and queries in Python

Software Architecture & Design

  • Software system design and architecture
  • Distributed systems and scalability
    • Event-driven architectures
    • Stateful vs stateless processes
    • Scalability implications
    • Fault tolerance

Security

  • Handling PII and sensitive information
  • Encryption and secure coding practices

Where can I find code samples?

Code samples are integrated into this developer’s guide. You can find those code samples in the temporalio/documentation-samples-python repository on GitHub.

Additional Python code samples are in the temporalio/samples-python repository on GitHub.

What are other resources for learning how to use the Python SDK?

What are the supported Python versions?

  • Temporal Python SDK 1.4 supports Python versions 3.7 to 3.11.
  • Temporal Python SDK 1.5 and later versions support Python 3.8 and above.

Where can I get help with using the Python SDK?

How to follow updates to the Python SDK

How to contribute to the Python SDK

The Temporal Python SDK is MIT licensed, and contributions are welcome. Please review our contribution guidelines.