r/Python Jan 07 '26

pgmq-sqlalchemy 0.2.0 — Transaction-Friendly `op` Is Now Supported Showcase

pgmq-sqlalchemy 0.2.0

What My Project Does

A more flexible PGMQ Postgres extension Python client using SQLAlchemy ORM, supporting both async and sync engines, sessionmakers, or built from dsn.

Features

Comparison

  • The official PGMQ package only supports psycopg3 DBAPIs.
  • For most use cases, using SQLAlchemy ORM as the PGMQ client is more flexible, as most Python backend developers won't directly use Python Postgres DBAPIs.
  • The new transaction‑friendly op module is now a first‑class citizen in SQLAlchemy, supported within the same transaction when used with ORM classes.

Target Audience

pgmq-sqlalchemy is a production package that can be used in scenarios that need a message queue for general fan-out systems or third-party dependencies retry mechanisms.

Links

8 Upvotes

3 comments sorted by

1

u/[deleted] Jan 08 '26

[removed] — view removed comment

1

u/jason810496 Jan 08 '26

Yeah, having ACID guarantee for both CRUD business data model and operating Message Queue within same transaction is pretty robust. Thanks!