python-temporal

Solid

Temporal workflow orchestration in Python. Use when designing workflows, implementing activities, handling retries, managing workflow state, or building durable distributed systems.

AI & Automation 46 stars 4 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
56
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Temporal Workflow Orchestration Temporal SDK patterns for building durable, distributed workflows in Python. ## Worker Setup ```python from temporalio.client import Client from temporalio.worker import Worker async def main(): client = await Client.connect("localhost:7233") worker = Worker( client, task_queue="my-task-queue", workflows=[MyWorkflow], activities=[my_activity], ) await worker.run() ``` ## Workflow Definition ```python from temporalio import workflow from datetime import timedelta @workflow.defn class MyWorkflow: @workflow.run async def run(self, name: str) -> str: """Workflow run method""" # Execute activity result = await workflow.execute_activity( my_activity, name, start_to_close_timeout=timedelta(seconds=30), ) return f"Hello {result}" ``` ## Activity Implementation ```python from temporalio import activity @activity.defn async def my_activity(name: str) -> str: """Activity - can fail and retry""" # Do work (database, API, etc.) return name.upper() ``` ## Starting Workflows ```python from temporalio.client import Client async def start_workflow(): client = await Client.connect("localhost:7233") handle = await client.start_workflow( MyWorkflow.run, "World", id="my-workflow-id", task_queue="my-task-queue", ) result = await handle.result() print(res...

Details

Author
martinffx
Repository
martinffx/atelier
Created
8 months ago
Last Updated
1 months ago
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category