--- id: pgqueuer version: "1.3.2" license: MIT License license_treatment: permissive maintenance: active --- # pgqueuer — Pgqueuer is a Python library leveraging PostgreSQL for efficient job queuing. License: permissive · Maintenance: active · Downloads: 261.9K/mo ## What it is and what it does PgQueuer is a Python job queue library that uses your PostgreSQL database as the backing store instead of requiring a separate message broker. You define job handlers as async functions decorated with @pgq.entrypoint, enqueue jobs from your application code, and run workers via the CLI. Jobs live in the same database as your application data, so you can enqueue a job and insert related records in a single transaction—if the transaction rolls back, the job never lands, eliminating dual-write drift. The library uses PostgreSQL's LISTEN/NOTIFY for instant job dispatch and FOR UPDATE SKIP LOCKED to ensure jobs are never double-processed. It supports cron-style scheduling, deferred execution, per-entrypoint concurrency limits, Prometheus metrics, and a live dashboard. For testing and prototyping, PgQueuer.in_memory() provides a drop-in replacement that runs without a database. Runtime dependencies are anyio, croniter, pydantic, pydantic-settings, tabulate, typer, and uvloop. Use it for: - Enqueue background tasks transactionally alongside your business data in a single database transaction. - Schedule recurring jobs using cron expressions without deploying a separate scheduler service. - Run integration tests and prototypes using the in-memory queue adapter without a database. - Monitor queue health and job throughput in real time using the built-in dashboard. - Process jobs with guaranteed ACID semantics because the queue and your application data share the same database. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PgQueuer turns PostgreSQL into a background job queue, letting you enqueue, schedule, and process jobs transactionally within your existing database instead of running a separate message broker. Yes. PgQueuer is actively maintained, permissively licensed (MIT), has no known vulnerabilities, and solves a real problem: if you already run PostgreSQL, you can eliminate a separate message broker and gain transactional consistency. The low install friction and support for modern Python versions (3.10+) make it straightforward to adopt. Start with the in-memory mode for testing, then move to PostgreSQL for production. ## Install pip install pgqueuer uv add pgqueuer poetry add pgqueuer ## Installing pgqueuer Before you install: Low friction: pure Python wheel with seven runtime dependencies. Active maintenance—last commit 2026-08-01, released 2026-07-27, 1517 GitHub stars. Targets Python 3.10+. License in practice: MIT licensed (permissive). No restrictions on commercial or proprietary use; you may modify and distribute freely under the same license. Quickstart: pip install pgqueuer from pgqueuer import PgQueuer from pgqueuer.db import AsyncpgDriver from pgqueuer.models import Job async def main(): pgq = PgQueuer(AsyncpgDriver(connection)) @pgq.entrypoint("my_job") async def process(job: Job): print(f"Processing: {job}") await pgq.qm.queries.enqueue("my_job", b"payload") Requires PostgreSQL 12+ and an existing database connection; jobs are durable only when backed by a real PostgreSQL database (in-memory mode is for testing only). Verify before relying: - Whether the dashboard (pgq dashboard command) requires additional dependencies or setup beyond the base install. - Performance characteristics and throughput limits under high concurrency or large job volumes. - Exact retry and backoff behavior when jobs fail, and whether custom executors are required for production retry strategies. - Which database drivers (asyncpg, psycopg async/sync) are included or require separate installation. ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 261.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags postgresql job queue, background job processing, async task queue python, database-backed job scheduler, postgres worker queue, transactional job enqueue, cron scheduling postgres, job-queue, postgres-native, async-tasks [View on SkillFed](https://skillfed.io/packages/pgqueuer) · [View on PyPI](https://pypi.org/project/pgqueuer/)