Python SDK

Python SDK

This is the generated API reference for the Hatchet Python SDK. For concepts and guides, see the user guide.

Core pages

  • Client: The main Hatchet client, its configuration, and the feature client accessors
  • Context: The context object passed to tasks at runtime
  • Runnables: Tasks and workflows, the objects you register on workers and run

Feature clients

Feature clients are available as properties on the client, and each covers one area of the Hatchet API. The Guide column links to the user guide page for the feature.

ClientDescriptionGuide
CELEvaluate and debug CEL expressions used in event filters and concurrency keys
CronsCreate and manage cron triggers that run workflows on a scheduleCron Runs
FiltersManage event filters that scope which events trigger runsEvents
LogsRead logs written by task runsLogging
MetricsRead queue depths, task status counts, and tenant Prometheus metricsPrometheus Metrics
Rate LimitsCreate and inspect rate limits that control task throughputRate Limits
RunsGet, replay, cancel, and inspect workflow runs and their resultsRunning Tasks
Scheduled RunsSchedule workflow runs for a specific future timeScheduled Runs
StubsCreate typed stubs for tasks and workflows registered in another serviceInter-Service Triggering
WebhooksManage incoming webhooks that trigger runs from external servicesWebhooks
WorkersList workers and manage their stateWorkers
WorkflowsList and manage registered workflow definitionsTasks

Python specifics

  • asyncio: Working with asyncio in the Python SDK
  • pydantic: Validating task inputs and outputs with Pydantic models
  • lifespans: Sharing state like connections and clients across tasks on a worker
  • dependency-injection: Injecting dependencies into tasks
  • dataclasses: Using dataclasses as task input and output types

Last updated on September 3, 2026

On this page