skillfed

pydocket

A distributed background task system for Python functions

pydocket v0.24.1 17.2M downloads/30d#1,129 on PyPI142
Permissive 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) Active released

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 pydocket

uv

uv add pydocket

poetry

poetry add pydocket

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

background task queue redisdistributed task scheduler pythonasync job schedulingredis streams task workerfuture work schedulingbackground job systemtask queue with scheduling
async-task-queueredis-streamsscheduling

More Distributed Computing packages