ZODB storage adapter using PostgreSQL JSONB with zodb-json-codec transcoding
Project description
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 + MinIO 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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zodb_pgjsonb-1.9.6.tar.gz.
File metadata
- Download URL: zodb_pgjsonb-1.9.6.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6315c34c021d2a345cc0b0edf875ed783e9acc83495f351b1863e51c0679f7be
|
|
| MD5 |
e5f5df6eb9338c7e447cf4ca06259a25
|
|
| BLAKE2b-256 |
523cff70de7e8d05e8132627f7f4917e6eeaf79376417c412e758375a598ce0b
|
Provenance
The following attestation bundles were made for zodb_pgjsonb-1.9.6.tar.gz:
Publisher:
release.yaml on bluedynamics/zodb-pgjsonb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zodb_pgjsonb-1.9.6.tar.gz -
Subject digest:
6315c34c021d2a345cc0b0edf875ed783e9acc83495f351b1863e51c0679f7be - Sigstore transparency entry: 1227814660
- Sigstore integration time:
-
Permalink:
bluedynamics/zodb-pgjsonb@677bbd765bf8480274d33705912f4a1215984595 -
Branch / Tag:
refs/tags/1.9.6 - Owner: https://github.com/bluedynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@677bbd765bf8480274d33705912f4a1215984595 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zodb_pgjsonb-1.9.6-py3-none-any.whl.
File metadata
- Download URL: zodb_pgjsonb-1.9.6-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bf14288a1819743f776b410264cb086110333675850f42d47ad4ff9f8f3dfb9
|
|
| MD5 |
21d9e9cee3a6df53b1c46bc818294b49
|
|
| BLAKE2b-256 |
899f1704c475c05c66f71e2509f4e2abd3380c6c70931c8e96f30b1f8fc20205
|
Provenance
The following attestation bundles were made for zodb_pgjsonb-1.9.6-py3-none-any.whl:
Publisher:
release.yaml on bluedynamics/zodb-pgjsonb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zodb_pgjsonb-1.9.6-py3-none-any.whl -
Subject digest:
5bf14288a1819743f776b410264cb086110333675850f42d47ad4ff9f8f3dfb9 - Sigstore transparency entry: 1227814697
- Sigstore integration time:
-
Permalink:
bluedynamics/zodb-pgjsonb@677bbd765bf8480274d33705912f4a1215984595 -
Branch / Tag:
refs/tags/1.9.6 - Owner: https://github.com/bluedynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@677bbd765bf8480274d33705912f4a1215984595 -
Trigger Event:
release
-
Statement type: