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/
- Quickstart (Docker) -- Plone + PostgreSQL + Garage in 5 minutes
- Migration guide -- migrate from FileStorage or RelStorage
- Configuration reference -- all ZConfig and Python API options
- Architecture -- design decisions and data flow
- Performance benchmarks -- detailed comparison with RelStorage
- SQL query examples -- querying ZODB data with SQL
- State processor plugins -- writing extra columns alongside object state
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.17.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zodb_pgjsonb-1.17.1.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zodb_pgjsonb-1.17.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.5 MB
Release files / zodb_pgjsonb-1.17.1.tar.gz
| Download URL | zodb_pgjsonb-1.17.1.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93455c8fc82ebe8420364c7a0f63997aa704d1253286667d8948225210279f28
|
|
BLAKE2b-256 checksum How to use checksums |
1f05cadfb4f31af6ff64104435186f366976d79cfb6898aba058dc5d158cc3d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 8, 2026.
Transparency logRelease files / zodb_pgjsonb-1.17.1-py3-none-any.whl
| Download URL | zodb_pgjsonb-1.17.1-py3-none-any.whl |
|---|---|
| Size | 80.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f136ed992fb54e34d4d944e11a5509f67aa5e1d382d9848bb1de3a92e7bd3b9b
|
|
BLAKE2b-256 checksum How to use checksums |
cd5c874d6a3f42ed69ec359af6ca6a29f905c1fdcb4cdca175c45b3dca3284d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 8, 2026.
Transparency log