Skip to main content

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/

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


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.10.4.tar.gz (2.3 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.10.4-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zodb_pgjsonb-1.10.4.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zodb_pgjsonb-1.10.4.tar.gz
Algorithm Hash digest
SHA256 a672aeb637c8ec9489eaa806e1ad8c2d04d6d60167d7f5d5f1eef6af04e405c5
MD5 d517bdc579880f6077b3d8409d929913
BLAKE2b-256 1c208bcfd9f43f850b227afa42dd35c955da5c13fe2cdd6511570adaf214b24d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodb_pgjsonb-1.10.4.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.10.4-py3-none-any.whl.

File metadata

  • Download URL: zodb_pgjsonb-1.10.4-py3-none-any.whl
  • Upload date:
  • Size: 62.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zodb_pgjsonb-1.10.4-py3-none-any.whl
Algorithm Hash digest
SHA256 28da85a324ec19d3c6ce35f970caf189c1bc5f6be307c42a18951db375ddedee
MD5 8ef349082cfd7b86d80b1548e439023a
BLAKE2b-256 6cbb4f4ad7f8d479ce54a6e4dbe7bc3a5d08da357dfe56764685940e07631d2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodb_pgjsonb-1.10.4-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.

Supported by

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