Skip to main content

Barebones async-powered message queue on python with psycopg (v3)

Project description

PG-AsynQ

PG-AsynQ is a Python library that provides an asynchronous transaction/message queue based on PostgreSQL. It is inspired by 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 using your preferred migration tool
  2. See the examples for how to use the library

Features

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pg_asynq-0.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pg_asynq-0.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pg_asynq-0.2.0.tar.gz.

File metadata

  • Download URL: pg_asynq-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pg_asynq-0.2.0.tar.gz
Algorithm Hash digest
SHA256 db023bacc69b6404f7d11c5fe775abc8ae641ed86a9ea413322701f0075e6052
MD5 fdb6da919c492844013e7ef15ae75834
BLAKE2b-256 3de0ed3df24835f30acda467c09340c89bcbf86792c81707629fd0acaac6f6dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg_asynq-0.2.0.tar.gz:

Publisher: publish.yml on amithkk/pg-asynq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pg_asynq-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pg_asynq-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pg_asynq-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 829d4cc7a8c788425e6e8dbd326627c1af3332f6042174d88fbebc4546ee9974
MD5 68d5e4c41b87f33f332185b27ddcb7ca
BLAKE2b-256 4178b7d67f955a2439160de2ee8512a3e4e2f480aa6c394ea86d3da442025a7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pg_asynq-0.2.0-py3-none-any.whl:

Publisher: publish.yml on amithkk/pg-asynq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page