pydocket 0.20.3


pip install pydocket

  Latest version

Released: May 19, 2026


Meta
Author: Chris Guidry
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Typing
  • Typed

Docket is a distributed background task system for Python functions with a focus on the scheduling of future work as seamlessly and efficiently as immediate work.

PyPI - Version PyPI - Python Version GitHub main checks Codecov PyPI - License Documentation

At a glance

from datetime import datetime, timedelta, timezone

from docket import Docket


async def greet(name: str, greeting="Hello") -> None:
    print(f"{greeting}, {name} at {datetime.now()}!")


async with Docket() as docket:
    await docket.add(greet)("Jane")

    now = datetime.now(timezone.utc)
    soon = now + timedelta(seconds=3)
    await docket.add(greet, when=soon)("John", greeting="Howdy")
from docket import Docket, Worker

async with Docket() as docket:
    docket.register(greet)
    async with Worker(docket) as worker:
        await worker.run_until_finished()
Hello, Jane at 2025-03-05 13:58:21.552644!
Howdy, John at 2025-03-05 13:58:24.550773!

Check out our docs for more details, examples, and the API reference.

Why docket?

โšก๏ธ Snappy one-way background task processing without any bloat

๐Ÿ“… Schedule immediate or future work seamlessly with the same interface

โญ๏ธ Skip problematic tasks or parameters without redeploying

๐ŸŒŠ Purpose-built for Redis streams

๐Ÿงฉ Fully type-complete and type-aware for your background task functions

๐Ÿ’‰ Dependency injection like FastAPI, Typer, and FastMCP for reusable resources

Installing docket

Docket is available on PyPI under the package name pydocket. It targets Python 3.10 or above.

With uv:

uv pip install pydocket

or

uv add pydocket

With pip:

pip install pydocket

Docket requires a Redis server with Streams support (which was introduced in Redis 5.0.0). Docket is tested with:

  • Redis 6.2, 7.4, and 8.6 (standalone and cluster modes)
  • Valkey 8.1
  • In-memory backend via burner-redis for testing

For testing without Redis, use the in-memory backend:

from docket import Docket

async with Docket(name="my-docket", url="memory://my-docket") as docket:
    # Use docket normally - all operations are in-memory
    ...

See Testing with Docket for more details.

Hacking on docket

We use uv for project management, so getting set up should be as simple as cloning the repo and running:

uv sync

The to run the test suite:

pytest

We aim to maintain 100% test coverage, which is required for all PRs to docket. We believe that docket should stay small, simple, understandable, and reliable, and that begins with testing all the dusty branches and corners. This will give us the confidence to upgrade dependencies quickly and to adapt to new versions of Redis over time.

To work on the documentation locally:

uv sync
uv run zensical serve

This will start a local preview server. The docs are built with Zensical and configured in mkdocs.yml.

0.20.3 May 19, 2026
0.20.2 May 11, 2026
0.20.1 May 06, 2026
0.20.0 May 04, 2026
0.19.2 Apr 20, 2026
0.19.1 Apr 15, 2026
0.19.0 Apr 10, 2026
0.18.2 Mar 10, 2026
0.18.1 Mar 06, 2026
0.18.0 Mar 02, 2026
0.17.9 Feb 20, 2026
0.17.8 Feb 17, 2026
0.17.7 Feb 11, 2026
0.17.6 Feb 10, 2026
0.17.5 Jan 30, 2026
0.17.4 Jan 30, 2026
0.17.3 Jan 27, 2026
0.17.2 Jan 26, 2026
0.17.2b3 Jan 26, 2026
0.17.2b2 Jan 25, 2026
0.17.2b1 Jan 24, 2026
0.17.1 Jan 22, 2026
0.17.0 Jan 22, 2026
0.16.6 Jan 09, 2026
0.16.5 Jan 09, 2026
0.16.4 Jan 08, 2026
0.16.3 Dec 23, 2025
0.16.2 Dec 23, 2025
0.16.1 Dec 19, 2025
0.16.0 Dec 18, 2025
0.15.6 Dec 16, 2025
0.15.5 Dec 12, 2025
0.15.4 Dec 11, 2025
0.15.3 Dec 09, 2025
0.15.2 Dec 08, 2025
0.15.1 Dec 08, 2025
0.15.0 Nov 25, 2025
0.14.1 Nov 20, 2025
0.14.0 Nov 19, 2025
0.13.4 Nov 19, 2025
0.13.3 Nov 18, 2025
0.13.2 Nov 13, 2025
0.13.1 Nov 10, 2025
0.13.0 Nov 10, 2025
0.13.0b3 Nov 07, 2025
0.13.0b2 Nov 07, 2025
0.13.0b1 Nov 06, 2025
0.12.0 Oct 28, 2025
0.11.1 Oct 07, 2025
0.11.0 Aug 19, 2025
0.10.0 Aug 18, 2025
0.9.2 Aug 18, 2025
0.9.1 Aug 18, 2025
0.9.0 Aug 18, 2025
0.8.0 Jul 30, 2025
0.7.1 Jun 24, 2025
0.7.0 May 19, 2025
0.6.4 Apr 23, 2025
0.6.3 Mar 29, 2025
0.6.2 Mar 28, 2025
0.6.1 Mar 28, 2025
0.6.0 Mar 28, 2025
0.5.2 Mar 26, 2025
0.5.1 Mar 26, 2025
0.5.0 Mar 22, 2025
0.4.0 Mar 19, 2025
0.3.2 Mar 18, 2025
0.3.1 Mar 17, 2025
0.3.0 Mar 12, 2025
0.2.1 Mar 07, 2025
0.2.0 Mar 07, 2025
0.1.4 Mar 07, 2025
0.1.3 Mar 07, 2025
0.1.2 Mar 06, 2025
0.1.1 Mar 06, 2025
0.1.0 Mar 05, 2025
0.0.2 Mar 03, 2025
0.0.1 Feb 27, 2025

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
burner-redis (>=0.1.7)
cloudpickle (>=3.1.1)
cronsim (>=2.6)
exceptiongroup (>=1.2.0)
opentelemetry-api (>=1.33.0)
prometheus-client (>=0.21.1)
py-key-value-aio[memory,redis] (>=0.3.0)
python-json-logger (>=2.0.7)
redis (>=5)
rich (>=13.9.4)
taskgroup (>=0.2.2)
typer (>=0.15.1)
typing-extensions (>=4.12.0)
tzdata (>=2025.2)
uncalled-for (>=0.3.2)