PG Change Feed — Python SDK
Official Python client library for PG Change Feed, a durable change feed system for PostgreSQL built on logical replication.
This package (pgchangefeed) lets a Python application consume PG Change Feed's delivery paths (HTTP API, gRPC stream, SSE stream, NATS full-content stream) without implementing the wire protocol itself — see LH-FA-SST-009 for the requirement this SDK fulfills.
Status
This package is at an early, pre-1.0 stage (0.x.y, ADR-0107, extended by ADR-0110). The current release provides the shared connection configuration (ClientOptions: server address and bearer token), a full HTTP API client surface (PgChangeFeedHttpClient): consumer registration/acknowledgement/position/removal, table enable/disable, status, table listing, retention, and reading changes — the nine SPEC-018 capabilities plus GET /changes (SPEC-022; each change carries origin, wal or backfill, read as wal when the response has none or carries JSON null, any other value passed through unchanged) —, the gRPC live-change-stream surface (PgChangeFeedGrpcClient): a server-streaming read of every committed change from connection time onward, fire-and-forget with no in-stream replay (SPEC-020, LH-FA-SST-008 boundary), the SSE live-change-stream surface (PgChangeFeedSseClient): the same fire-and-forget, no-replay stream over Server-Sent-Events instead of gRPC (SPEC-021, LH-FA-SST-008 boundary), and the NATS full-content stream surface (PgChangeFeedNatsStreamClient): the same message schema and fire-and-forget, no-replay boundary, delivered over a NATS subject namespace instead of HTTP, with connection-level (not per-call) token authentication (SPEC-024, LH-FA-SST-008 boundary) — the full four-way matrix beside C# (PgChangeFeed.Client) and Kotlin (pgchangefeed-kotlin).
If a surface you need isn't covered yet, the direct wire protocol remains fully usable on its own — no examples/python/ reference client exists yet (ADR-0107 §Kontext); see the examples reference clients for other languages in the main repository.
Installation
pip install pgchangefeed
Documentation
This README intentionally does not duplicate the wire protocol documentation. For the full picture — server setup, HTTP/gRPC/SSE/NATS delivery paths, and operational guidance — see the project README and the technical specification (spec/pflichtenheft.md, SPEC-018) in the main repository.
License
MIT — see LICENSE.
Release files for pgchangefeed 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgchangefeed-0.2.0.tar.gz | 25.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pgchangefeed-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.0 kB
Release files / pgchangefeed-0.2.0.tar.gz
| Download URL | pgchangefeed-0.2.0.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1406019bbfa79b3cd223fcce8b5e943063c42239164d1edd754b18c97eaf3b8f
|
|
BLAKE2b-256 checksum How to use checksums |
57d138322de11dbb740017dde809beea84fbfaea37f1b130c00fdd7ef4a5cfa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pgchangefeed-0.2.0-py3-none-any.whl
| Download URL | pgchangefeed-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee49706f0d2b1258eead95670ef6ead53aebf6d8745e5249cd8b1a59ade5191a
|
|
BLAKE2b-256 checksum How to use checksums |
6d0653e2afb027102323a22d2ba316ff2fe3544ed8f27bee3514db354754ceab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|