atelier-python-temporal_skill

This skill helps you design and manage durable Python Temporal workflows, activities, and retries with practice-ready patterns.
  • JavaScript

4

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill martinffx/claude-code-atelier --skill atelier-python-temporal

  • SKILL.md2.9 KB

Overview

This skill provides practical patterns and examples for building durable Temporal workflows in Python. It covers worker setup, workflow and activity definitions, starting workflows, error handling, signals, and queries to help design resilient distributed systems. Use it to implement long-running business logic with retries, state management, and external interaction.

How this skill works

The skill demonstrates how to connect a Temporal client to a worker, register workflows and activities, and run the worker loop. It shows idiomatic Python workflow and activity definitions using decorators, how to invoke activities with timeouts and retry policies, and how to start and await workflow results. It also covers signals and queries for external control and inspection of running workflows.

When to use it

  • Designing long-running or stateful business processes that must survive crashes and restarts
  • Implementing activities that call external services, databases, or perform IO with retry behavior
  • Coordinating multiple distributed tasks with durable state and event-driven transitions
  • Exposing workflow control paths via signals and runtime inspection via queries
  • Testing and debugging workflow logic locally before deploying to Temporal Server

Best practices

  • Keep workflow code deterministic: avoid non-deterministic calls and side effects inside workflows
  • Push blocking IO and external calls into activities; workflows should orchestrate, activities should perform work
  • Use explicit timeouts and RetryPolicy for activities to manage transient failures
  • Model state clearly and use signals to mutate workflow state safely from external systems
  • Use unique workflow IDs and task queues for clarity and idempotence during restarts

Example use cases

  • Order processing pipeline where approval comes from an external user via a signal, and queries report status
  • ETL job orchestration with retries for transient network or database failures handled by activities
  • Human-in-the-loop processes that wait for signals before advancing workflow steps
  • Microservice saga coordination with durable compensation steps implemented as activities
  • Scheduled or periodic workflows that perform recurring maintenance or reporting tasks

FAQ

Run a local Temporal server or test harness, start workers in a test fixture, and use the client to execute workflows and assert results. Keep activities small and mock external dependencies where possible.

Where should I put retry logic?

Put retry policies on activities so retries are tied to external interactions. Workflow-level retries are typically for orchestration-level failures, but activity retries handle transient external errors.

Can workflows call blocking code?

No. Workflows must remain deterministic and non-blocking. Place blocking or IO work inside activities and call them from the workflow using execute_activity.

How do I signal a running workflow?

Use the client to send a signal to the workflow by ID or handle. Define @workflow.signal methods in the workflow class to mutate workflow state in a controlled, deterministic way.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational