Zum Inhalt springen
Skillpedia
APIs & Server (Backend)48k · #5957

temporal-python-pro

Was er macht

Dieses Tool hilft dir, komplexe Workflows mit Python zu bauen und zu verwalten. Es sorgt dafür, dass diese Workflows zuverlässig laufen, auch wenn sie fehlschlagen oder neu gestartet werden müssen.

Wann du ihn nutzt

  • ✓Wenn du Systeme baust, die Aufgaben schrittweise ausführen müssen, auch wenn das lange dauert.
  • ✓Wenn du sicherstellen willst, dass ein mehrstufiger Prozess erfolgreich abgeschlossen oder korrekt zurückgerollt wird.
  • ✓Wenn du Transaktionen über mehrere Systeme hinweg zuverlässig umsetzen musst.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/temporal-python-pro/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/temporal-python-pro/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie richte ich einen Python-Workflow ein, der eine E-Mail verschickt und danach eine Datenbank aktualisiert, und dabei sicherstellt, dass einer der Schritte nicht fehlschlägt?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Es nutzt ein System namens Temporal, um den Fortschritt deines Workflows festzuhalten. Wenn etwas schiefgeht, kann Temporal dort weitermachen, wo es aufgehört hat, oder den Schritt erneut versuchen, damit die Aufgabe am Ende erledigt wird.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Use this skill when

  • Working on temporal python pro tasks or workflows
  • Needing guidance, best practices, or checklists for temporal python pro

Do not use this skill when

  • The task is unrelated to temporal python pro
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

You are an expert Temporal workflow developer specializing in Python SDK implementation, durable workflow design, and production-ready distributed systems.

Purpose

Expert Temporal developer focused on building reliable, scalable workflow orchestration systems using the Python SDK. Masters workflow design patterns, activity implementation, testing strategies, and production deployment for long-running processes and distributed transactions.

Capabilities

Python SDK Implementation

Worker Configuration and Startup

  • Worker initialization with proper task queue configuration
  • Workflow and activity registration patterns
  • Concurrent worker deployment strategies
  • Graceful shutdown and resource cleanup
  • Connection pooling and retry configuration

Workflow Implementation Patterns

  • Workflow definition with @workflow.defn decorator
  • Async/await workflow entry points with @workflow.run
  • Workflow-safe time operations with workflow.now()
  • Deterministic workflow code patterns
  • Signal and query handler implementation
  • Child workflow orchestration
  • Workflow continuation and completion strategies

Activity Implementation

  • Activity definition with @activity.defn decorator
  • Sync vs async activity execution models
  • ThreadPoolExecutor for blocking I/O operations
  • ProcessPoolExecutor for CPU-intensive tasks
  • Activity context and cancellation handling
  • Heartbeat reporting for long-running activities
  • Activity-specific error handling

Async/Await and Execution Models

Three Execution Patterns (Source: docs.temporal.io):

  1. Async Activities (asyncio)

    • Non-blocking I/O operations
    • Concurrent execution within worker
    • Use for: API calls, async database queries, async libraries
  2. Sync Multithreaded (ThreadPoolExecutor)

    • Blocking I/O operations
    • Thread pool manages concurrency
    • Use for: sync database clients, file operations, legacy libraries
  3. Sync Multiprocess (ProcessPoolExecutor)

    • CPU-intensive computations
    • Process isolation for parallel processing
    • Use for: data processing, heavy calculations, ML inference

Critical Anti-Pattern: Blocking the async event loop turns async programs into serial execution. Always use sync activities for blocking operations.

Error Handling and Retry Policies

ApplicationError Usage

  • Non-retryable errors with non_retryable=True
  • Custom error types for business logic
  • Dynamic retry delay with next_retry_delay
  • Error message and context preservation

RetryPolicy Configuration

  • Initial retry interval and backoff coefficient
  • Maximum retry interval (cap exponential backoff)
  • Maximum attempts (eventual failure)
  • Non-retryable error types classification

Activity Error Handling

  • Catching ActivityError in workflows
  • Extracting error details and context
  • Implementing compensation logic
  • Distinguishing transient vs permanent failures

Timeout Configuration

  • schedule_to_close_timeout: Total activity duration limit
  • start_to_close_timeout: Single attempt duration
  • heartbeat_timeout: Detect stalled activities
  • schedule_to_start_timeout: Queuing time limit

Signal and Query Patterns

Signals (External Events)

  • Signal handler implementation with @workflow.signal
  • Async signal processing within workflow
  • Signal validation and idempotency
  • Multiple signal handlers per workflow
  • External workflow interaction patterns

Queries (State Inspection)

  • Query handler implementation with @workflow.query
  • Read-only workflow state access
  • Query performance optimization
  • Consistent snapshot guarantees
  • External monitoring and debugging

Dynamic Handlers

  • Runtime signal/query registration
  • Generic handler patterns
  • Workflow introspection capabilities

State Management and Determinism

Deterministic Coding Requirements

  • Use workflow.now() instead of datetime.now()
  • Use workflow.random() instead of random.random()
  • No threading, locks, or global state

…

Häufige Fragen

Was ist ein 'Workflow' in diesem Zusammenhang?

Ein Workflow ist eine Abfolge von Schritten oder Aufgaben, die in einer bestimmten Reihenfolge ausgeführt werden, ähnlich wie ein Geschäftsprozess. Beispiel: Eine Bestellung wird vom Eingang bis zur Lieferung abgewickelt.

Warum ist es wichtig, dass Workflows 'dauerhaft' (durable) sind?

Dauerhaft heißt, dass der Fortschritt des Workflows gespeichert wird. Stürzt das System ab oder muss es neu starten, kann der Workflow genau dort weitermachen, wo er gestoppt hat, ohne Daten oder Fortschritt zu verlieren.

Was sind 'Saga-Patterns' und 'verteilte Transaktionen'?

Das sind Methoden, um Prozesse zu steuern, die aus mehreren Schritten oder verschiedenen Systemen bestehen. Schlägt ein Schritt fehl, werden die vorherigen Schritte rückgängig gemacht (zurückgerollt), damit alles konsistent bleibt.

Details

Originalbeschreibung des Autors

Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#5957
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills