github hatchet-dev/hatchet py/1.46.0
Python SDK 1.46.0

latest release: v0.120.5
2 hours ago

Overview

Added

  • mock_run and aio_mock_run accept task_run_errors, trigger_data, workflow_run_id, and task_run_id, so unit tests can cover on-failure tasks, tasks with wait_for conditions, and tasks that read their run ids.

Fixed

  • A dependency used more than once in a task's dependency tree is now resolved once per run and its value is shared, matching FastAPI's Depends.
  • Context manager dependencies now receive the task's exception when the task fails, so they can e.g. roll back a transaction. A dependency that catches the exception without re-raising it no longer makes the task succeed or hides the exception from the other dependencies.
  • The REST client can read workflow versions whose concurrency uses CANCEL_NEWEST, CANCEL_QUEUED_EXCEPT_NEWEST, or CANCEL_QUEUED_EXCEPT_OLDEST.

Removed

  • grpcio-tools is no longer a runtime dependency, since the SDK only uses it to generate protobuf code. This avoids building it from source on Python 3.15, where the newest grpcio-tools versions compatible with protobuf<7 have no prebuilt wheels.

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:

Core concepts:

Flow control:

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

Installation

Install the SDK using pip:

pip install hatchet-sdk

Or using poetry:

poetry add hatchet-sdk

Documentation

For detailed documentation, examples, and best practices, visit:

What's Changed?

  • feat(tenants): let owners opt into Labs preview features (#5442) by @grutt
  • feat(frontend): runs filter sidebar behind a feature flag (#5489) by @jbsouvestre
  • fix(python): dependency injection bugs, expanding mock_run (#5497) by @mrkaye97

Don't miss a new hatchet release

NewReleases is sending notifications on new releases.