pydocket
A distributed background task system for Python functions
What it is and what it does
Pydocket is a distributed background task queue built on Redis streams for Python async functions. It lets you queue work to run immediately or at a specific future time using the same simple interface: call `add(function, when=optional_datetime)(args)`. A Worker process pulls tasks from the queue and executes them, with full type hints and dependency injection support.
The package targets Python 3.10+ and requires a Redis server (tested with 6.2, 7.4, 8.6, or Valkey 8.1). For local testing, you can use an in-memory backend via burner-redis without a real Redis instance. It depends on redis, cloudpickle, typer, rich, prometheus-client, opentelemetry-api, and several utility libraries for scheduling, logging, and async task management.
Use it for:
- Queue email or notification sends to run asynchronously without blocking the main request.
- Schedule data processing jobs to run at specific times without deploying cron jobs.
- Skip or retry problematic tasks by updating the queue without redeploying code.
- Monitor background work with prometheus-client metrics and opentelemetry-api tracing.
- Test async task logic in isolation using the in-memory backend without Redis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Docket is a distributed background task system that queues Python async functions for immediate or scheduled execution via Redis streams, with a unified interface for both immediate and future work.
Yes, if you need a lightweight, type-aware background task queue with integrated scheduling. Active maintenance (released 4 days ago), permissive MIT license, low install friction, and zero known vulnerabilities make it a solid choice. Requires Python 3.10+ and Redis 5.0.0+ or in-memory backend for testing. Small dependency footprint and focus on simplicity are strengths if you want to avoid heavier frameworks.
Install
pydocket on PyPI
pip
pip install pydocketuv
uv add pydocketpoetry
poetry add pydocketInstalling pydocket
Before you install
Low install friction with a pure-Python wheel. Active maintenance—released 4 days ago with a last commit on 2026-08-12. Requires Redis 5.0.0+ or can use an in-memory backend via burner-redis for testing.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and proprietary projects.
Quickstart
pip install pydocket
from pydocket import Docket
from datetime import datetime, timedelta, timezone
async def greet(name: str) -> None:
print(f"Hello, {name}!")
async with Docket() as docket:
await docket.add(greet)("Jane")
soon = datetime.now(timezone.utc) + timedelta(seconds=3)
await docket.add(greet, when=soon)("John")
Requires Python 3.10 or above and a Redis server with Streams support (Redis 5.0.0+, Valkey 8.1+, or in-memory burner-redis for testing).
Verify before relying
- Whether the package handles task retries, dead-letter queues, or failure callbacks.
- Scalability limits or performance characteristics under high task volume.
- Whether dependency injection support is fully documented with examples.
Package facts
| License | # Released under MIT License Copyright (c) 2025 Chris Guidry. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 15 — burner-redis, cloudpickle, cronsim, exceptiongroup, opentelemetry-api, prometheus-client, py-key-value-aio, python-json-logger, redis, rich, taskgroup, typer, typing-extensions, tzdata, uncalled-for |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 17,178,652/month — #1,129 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pydocket-0.24.1-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
arqarq provides a job queue system for Python that…
permissive · top 5,000 on PyPI
hatchet-sdkHatchet SDK is the official Python client for…
permissive · top 5,000 on PyPI
hueyHuey is a lightweight task queue library that…
unclear · top 5,000 on PyPI
doitdoit is a Python-based task automation and…
permissive · top 5,000 on PyPI
gen-workerA Python SDK for writing serverless endpoints…
permissive · top 15,000 on PyPI
rq-schedulerAdds job scheduling capabilities to RQ (Redis…
permissive · top 15,000 on PyPI
dramatiqDramatiq is a distributed task processing…
copyleft · top 5,000 on PyPI
taskiq-redisAdds Redis-based message brokers and result…
permissive · top 5,000 on PyPI
rqRQ is a Python library for queueing jobs and…
permissive · top 5,000 on PyPI
upstash-redisHTTP-based Redis client for Python that…
permissive · top 5,000 on PyPI