Metadata-Version: 2.5
Name: hatchet-sdk
Version: 1.40.1
Summary: This is the official Python SDK for Hatchet, a distributed, fault-tolerant task queue. The SDK allows you to easily integrate Hatchet's task scheduling and workflow orchestration capabilities into your Python applications.
Author-email: Alexander Belanger <alexander@hatchet.run>, Matt Kaye <matt@hatchet.run>, Gabe Ruttner <gabe@hatchet.run>, Mohammed Nafees <nafees@hatchet.run>
License: MIT
Requires-Python: <4,>=3.10
Requires-Dist: aiohttp<4,>=3.10.5
Requires-Dist: grpcio-status<2,>=1.76.0
Requires-Dist: grpcio-tools<2,>=1.76.0
Requires-Dist: grpcio<2,>=1.76.0
Requires-Dist: prometheus-client>=0.21.1
Requires-Dist: protobuf<7,>=6.30.2
Requires-Dist: pydantic-settings<3,>=2.7.1
Requires-Dist: pydantic<3,>=2.6.3
Requires-Dist: python-dateutil<3,>=2.9.0.post0
Requires-Dist: tenacity>=8.4.1
Requires-Dist: typing-inspection>=0.1.0
Requires-Dist: urllib3<3,>=2.6.0
Provides-Extra: claude
Requires-Dist: claude-agent-sdk; extra == 'claude'
Requires-Dist: mcp; extra == 'claude'
Provides-Extra: docs
Requires-Dist: bs4>=0.0.2; extra == 'docs'
Requires-Dist: fastapi<1,>=0.141.1; extra == 'docs'
Requires-Dist: griffe-pydantic<2,>=1.3.1; extra == 'docs'
Requires-Dist: markdownify>=1.2.3; extra == 'docs'
Requires-Dist: mkdocs<2,>=1.6.1; extra == 'docs'
Requires-Dist: mkdocstrings[python]<2,>=1.0.6; extra == 'docs'
Requires-Dist: pydoclint>=0.9.1; extra == 'docs'
Requires-Dist: types-beautifulsoup4>=4.12.0.20250204; extra == 'docs'
Requires-Dist: uvicorn<1,>=0.52.1; extra == 'docs'
Provides-Extra: lint
Requires-Dist: black==26.3.1; extra == 'lint'
Requires-Dist: click>=8.4.2; extra == 'lint'
Requires-Dist: mypy==1.20.1; extra == 'lint'
Requires-Dist: psutil>=6.0.0; extra == 'lint'
Requires-Dist: ruff==0.15.10; extra == 'lint'
Requires-Dist: types-grpcio-status<2.0.0.0,>=1.0.0.20260408; extra == 'lint'
Requires-Dist: types-grpcio>=1.83.0.20260730; extra == 'lint'
Requires-Dist: types-protobuf>=5.28.3.20241030; extra == 'lint'
Requires-Dist: types-psutil>=7.2.2.20260518; extra == 'lint'
Requires-Dist: types-requests>=2.33.0.20260712; extra == 'lint'
Provides-Extra: openai
Requires-Dist: openai-agents; extra == 'openai'
Provides-Extra: otel
Requires-Dist: opentelemetry-api<2,>=1.28.0; extra == 'otel'
Requires-Dist: opentelemetry-distro>=0.49b0; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.28.0; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp<2,>=1.28.0; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation>=0.49b0; extra == 'otel'
Requires-Dist: opentelemetry-sdk<2,>=1.28.0; extra == 'otel'
Provides-Extra: test
Requires-Dist: boto3[s3]>=1.43.62; extra == 'test'
Requires-Dist: botocore>=1.43.67; extra == 'test'
Requires-Dist: psycopg[pool]<4,>=3.3.4; extra == 'test'
Requires-Dist: pytest-asyncio>=1.4.0; extra == 'test'
Requires-Dist: pytest-env>=1.7.0; extra == 'test'
Requires-Dist: pytest-retry>=1.7.0; extra == 'test'
Requires-Dist: pytest-xdist>=3.7.0; extra == 'test'
Requires-Dist: pytest<10,>=9.1.1; extra == 'test'
Requires-Dist: requests<3,>=2.34.2; extra == 'test'
Description-Content-Type: text/markdown

# Hatchet Python SDK

<div align="center">

[![PyPI version](https://badge.fury.io/py/hatchet-sdk.svg)](https://badge.fury.io/py/hatchet-sdk)
[![Documentation](https://img.shields.io/badge/docs-hatchet.run-blue)](https://docs.hatchet.run)
[![License: MIT](https://img.shields.io/badge/License-MIT-purple.svg)](https://opensource.org/licenses/MIT)

</div>

This is the official Python SDK for [Hatchet](https://hatchet.run), a distributed, fault-tolerant task queue. The SDK allows you to easily integrate Hatchet's task scheduling and workflow orchestration capabilities into your Python applications.

<!-- hatchet-agent-docs:start -->
<!-- Generated by the SDK docs pipeline from frontend/docs/reference-map.json. Do not edit by hand. -->

## Documentation for agents

The linked pages serve plain markdown for tools and agents. Full docs index: https://docs.hatchet.run/llms.txt

Setup and local development:

- Quickstart: https://docs.hatchet.run/v1/quickstart.md
- Running Hatchet locally: https://docs.hatchet.run/v1/running-locally.md
- Embedded mode: https://docs.hatchet.run/v1/embedded.md

Core concepts:

- Tasks: https://docs.hatchet.run/v1/tasks.md
- Workers: https://docs.hatchet.run/v1/workers.md
- Running tasks: https://docs.hatchet.run/v1/running-your-task.md
- DAGs: https://docs.hatchet.run/v1/directed-acyclic-graphs.md
- Durable execution: https://docs.hatchet.run/v1/durable-execution.md

Flow control:

- Concurrency: https://docs.hatchet.run/v1/concurrency.md
- Rate limits: https://docs.hatchet.run/v1/rate-limits.md
- Retries: https://docs.hatchet.run/v1/retry-policies.md
- Idempotency: https://docs.hatchet.run/v1/idempotency.md
- CEL expressions: https://docs.hatchet.run/v1/cel-expressions.md

Python SDK reference (overview: https://docs.hatchet.run/reference/python.md):

- CEL: https://docs.hatchet.run/reference/python/feature-clients/cel.md (guide: https://docs.hatchet.run/v1/cel-expressions.md)
- Crons: https://docs.hatchet.run/reference/python/feature-clients/cron.md (guide: https://docs.hatchet.run/v1/cron-runs.md)
- Filters: https://docs.hatchet.run/reference/python/feature-clients/filters.md (guide: https://docs.hatchet.run/v1/events.md)
- Logs: https://docs.hatchet.run/reference/python/feature-clients/logs.md (guide: https://docs.hatchet.run/v1/logging.md)
- Metrics: https://docs.hatchet.run/reference/python/feature-clients/metrics.md (guide: https://docs.hatchet.run/v1/prometheus-metrics.md)
- Rate Limits: https://docs.hatchet.run/reference/python/feature-clients/rate_limits.md (guide: https://docs.hatchet.run/v1/rate-limits.md)
- Runs: https://docs.hatchet.run/reference/python/feature-clients/runs.md (guide: https://docs.hatchet.run/v1/running-your-task.md)
- Scheduled Runs: https://docs.hatchet.run/reference/python/feature-clients/scheduled.md (guide: https://docs.hatchet.run/v1/scheduled-runs.md)
- Stubs: https://docs.hatchet.run/reference/python/feature-clients/stubs.md (guide: https://docs.hatchet.run/v1/inter-service-triggering.md)
- Webhooks: https://docs.hatchet.run/reference/python/feature-clients/webhooks.md (guide: https://docs.hatchet.run/v1/webhooks.md)
- Workers: https://docs.hatchet.run/reference/python/feature-clients/workers.md (guide: https://docs.hatchet.run/v1/workers.md)
- Workflows: https://docs.hatchet.run/reference/python/feature-clients/workflows.md (guide: https://docs.hatchet.run/v1/tasks.md)

<!-- hatchet-agent-docs:end -->

## Installation

Install the SDK using pip:

```bash
pip install hatchet-sdk
```

Or using poetry:

```bash
poetry add hatchet-sdk
```

## Quick Start

For examples of how to use the Hatchet Python SDK, including worker setup and task execution, please see our [official documentation](https://docs.hatchet.run/home/setup).

## Features

- 🔄 **Workflow Orchestration**: Define complex workflows with dependencies and parallel execution
- 🔁 **Automatic Retries**: Configure retry policies for handling transient failures
- 📊 **Observability**: Track workflow progress and monitor execution metrics
- ⏰ **Scheduling**: Schedule workflows to run at specific times or on a recurring basis
- 🔄 **Event-Driven**: Trigger workflows based on events in your system

## Documentation

For detailed documentation, examples, and best practices, visit:
- [Hatchet Documentation](https://docs.hatchet.run)
- [Examples](https://github.com/hatchet-dev/hatchet/tree/main/sdks/python/examples)

## Contributing

We welcome contributions! Please check out our [contributing guidelines](https://docs.hatchet.run/contributing) and join our [Discord community](https://hatchet.run/discord) for discussions and support.

## License

This SDK is released under the MIT License. See [LICENSE](https://github.com/hatchet-dev/hatchet/blob/main/LICENSE) for details.
