Metadata-Version: 2.1
Name: pg_asynq
Version: 0.2.0
Summary: Barebones async-powered message queue on python with psycopg (v3)
Home-page: https://github.com/amithkk/pg-asynq
License: MIT
Author: Amith K K
Author-email: amithkumaran@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Requires-Dist: orjson (>=3.10.12,<4.0.0)
Requires-Dist: psycopg[pool] (>=3.2.3,<4.0.0)
Project-URL: Repository, https://github.com/amithkk/pg-asynq
Description-Content-Type: text/markdown

# PG-AsynQ

PG-AsynQ is a Python library that provides an asynchronous transaction/message queue based on PostgreSQL. 
It is inspired by [pq](https://pypi.org/project/pq/), but is built for use in asynchronous contexts such as FastAPI, 
and uses psycopg 3.x for database access.

Non blocking queuing is implemented with a combination of `LISTEN/NOTIFY` and `SKIP LOCKED`. This means that this 
library is safe to use across multiple containers/processes without duplicated processing of messages.

# How to use

1. Ensure you create the tables in [migrations](./migrations) using your preferred migration tool
2. See the [examples](./examples) for how to use the library

# Features

- [x] Create and consume queues dynamically at runtime
- [x] Consume queue from any number of consumers
- [x] Retain messages until a consumer connects
- [x] In-order processing of messages
- [ ] Message retention policies (delete older than x)
