Python SDK
Temporal Python SDK: Diving into Workers and Workflows

Temporal Python SDK: Diving into Workers and Workflows

3/7/2023

What this post added

This post details the structure of Temporal Python SDK code, specifically focusing on organizing workflow and activity definitions into separate files. It explains the use of Python dataclasses for workflow inputs, the `@activity.defn` and `@workflow.defn` decorators, and the `workflow.execute_activity` method with `start_to_close_timeout`. It also demonstrates how to set up a worker in `worker.py` to connect to the Temporal Server and execute a workflow using `client.execute_workflow`, including specifying the workflow ID and task queue.

Read the original post ↗