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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zodb_pgjsonb-1.16.2.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zodb_pgjsonb-1.16.2-py3-none-any.whl (79.1 kB view details)

Uploaded Python 3

File details

Details for the file zodb_pgjsonb-1.16.2.tar.gz.

File metadata

  • Download URL: zodb_pgjsonb-1.16.2.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zodb_pgjsonb-1.16.2.tar.gz
Algorithm Hash digest
SHA256 d3bc8a32f845bc4f19850f69e75032a486c4d47437357909940ab4c1beac6e27
MD5 7f60bdfcbfbbef6feeae4aa32252192a
BLAKE2b-256 0bc8bb3e77386c608f4791c8d95a7456155a413e8d0971c8d41a1e5a392a3209

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodb_pgjsonb-1.16.2.tar.gz:

Publisher: release.yaml on bluedynamics/zodb-pgjsonb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zodb_pgjsonb-1.16.2-py3-none-any.whl.

File metadata

  • Download URL: zodb_pgjsonb-1.16.2-py3-none-any.whl
  • Upload date:
  • Size: 79.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zodb_pgjsonb-1.16.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1faf1b47cd9258b1307f0bd2779fcfaf7be4b7a33f753f38fe9b6c44677da569
MD5 fd9c8bd8f7c97c57891629711242efc8
BLAKE2b-256 10565e096ceb15a669cdbac31f591143a8e47b1dd87ffcfa43cc8707d3cc0101

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodb_pgjsonb-1.16.2-py3-none-any.whl:

Publisher: release.yaml on bluedynamics/zodb-pgjsonb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.16.2 This release

2 files

1.16.1

2 files

1.16.0

2 files

1.15.0

2 files

1.14.3

2 files

1.14.2

2 files

1.14.1

2 files

1.14.0

2 files

1.13.1

2 files

1.13.0

2 files

1.12.0

2 files

1.11.1

2 files

1.11.0

2 files

1.10.4

2 files

1.10.3

2 files

1.10.2

2 files

1.10.1

2 files

1.10.0

2 files

1.9.6

2 files

1.9.5

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

1.7.3

2 files

1.7.2

2 files

1.7.0

2 files

1.6.1

2 files

1.6.0

2 files

1.5.6

2 files

1.5.5

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page