Skip to main content

zodb-pgjsonb

ZODB storage adapter for PostgreSQL using JSONB, powered by zodb-json-codec.

zodb-pgjsonb stores object state as queryable JSONB instead of opaque pickle bytea. ZODB sees pickle bytes at its boundaries; PostgreSQL sees queryable JSON internally.

  • SQL Queryability -- query ZODB objects directly with PostgreSQL JSONB operators and GIN indexes
  • Performance -- Rust-based codec, psycopg3 pipelined writes, pure SQL pack/GC (15-28x faster than RelStorage)
  • Tiered Blobs -- small blobs in PG bytea, large blobs in S3 (configurable threshold)
  • Full ZODB Compatibility -- IStorage, IMVCCStorage, IBlobStorage, IStorageUndoable, IStorageIteration, IStorageRestoreable
  • Security -- JSON has no code execution attack surface (unlike pickle deserialization)

Requires Python 3.12+, PostgreSQL 15+ (tested with 17).

Quick Start

%import zodb_pgjsonb

<zodb_db main>
    <pgjsonb>
        dsn dbname=zodb user=zodb password=zodb host=localhost port=5432
    </pgjsonb>
</zodb_db>
pip install zodb-pgjsonb          # or: pip install zodb-pgjsonb[s3]

Documentation

Full documentation: https://bluedynamics.github.io/zodb-pgjsonb/

Source Code and Contributions

The source code is managed in a Git repository, with its main branches hosted on GitHub. Issues can be reported there too.

We'd be happy to see many forks and pull requests to make this package even better. We welcome AI-assisted contributions, but expect every contributor to fully understand and be able to explain the code they submit. Please don't send bulk auto-generated pull requests.

Maintainers are Jens Klein and the BlueDynamics Alliance developer team. We appreciate any contribution and if a release on PyPI is needed, please just contact one of us. We also offer commercial support if any training, coaching, integration or adaptations are needed.

License

ZPL-2.1 (Zope Public License)

Metadata

Release files for zodb-pgjsonb 1.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zodb-pgjsonb 1.19.0
File Size Uploaded Provenance Actions
zodb_pgjsonb-1.19.0.tar.gz 2.5 MB With provenance Details for zodb_pgjsonb-1.19.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zodb-pgjsonb 1.19.0
File Interpreter ABI Platform Actions
zodb_pgjsonb-1.19.0-py3-none-any.whl Python 3 none any Details for zodb_pgjsonb-1.19.0-py3-none-any.whl

Total release size: 2.6 MB

Release files / zodb_pgjsonb-1.19.0.tar.gz

Download URL zodb_pgjsonb-1.19.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
79da91e7da9949c69ad5104907df774fa1c03dd9558087fb46f20f679c69bfb2
BLAKE2b-256 checksum
How to use checksums
88b7941e9718a46f4378b2aebebf2838f7aba82e03b4a9bcd549592dec0cbb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / zodb_pgjsonb-1.19.0-py3-none-any.whl

Download URL zodb_pgjsonb-1.19.0-py3-none-any.whl
Size 83.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b120cee6a0c9ca15dda48189afa9b12ec4e88212641eb3a486d501b801e45aa1
BLAKE2b-256 checksum
How to use checksums
c6d7add258e271ce6617e2814141986c347b119ad5167e36cc4cbae015f5b60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for zodb-pgjsonb 1.19.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for zodb_pgjsonb-1.19.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.19.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page