Skip to main content

Official unified database wrapper for the Xeze infrastructure.

Project description

xeze-dbr-core

Official unified database wrapper for the Xeze infrastructure. Provides a single, heavily-abstracted client for PostgreSQL, MongoDB, and Redis over mTLS via HashiCorp Vault.

Installation

pip install git+https://code.xeze.org/xeze/xeze-dbr-core.git

Or install locally for development:

pip install .

Quick Start

from xeze_core import XezeCoreClient

db = XezeCoreClient(app_namespace="xms")
db.init_workspace()  # Ensures the 'xms_pg' database exists

# Postgres
db.pg_insert("students", {"name": "Ayush", "grade": "A"})

# MongoDB
db.mongo_insert("audit_logs", {"action": "student_added", "timestamp": "2026-04-05"})

# Redis
db.redis_set("cache:student:latest", "Ayush", ttl=300)

Environment Variables

Variable Default Description
VAULT_ADDR http://127.0.0.1:8200 HashiCorp Vault address
VAULT_TOKEN dev-root-token Vault authentication token
DB_ROUTER_HOST db.0.xeze.org:443 Database Router gRPC host

Architecture

  • Database-per-Service isolation — each app_namespace gets its own {ns}_pg, {ns}_mongo, and {ns}: Redis prefix.
  • Vault mTLS — client certs are fetched from Vault KV at dbrouter/certs and loaded in-memory only.
  • gRPC/Protobuf abstraction — all Protobuf packing is handled internally; developers work with native Python dicts.

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

xeze_dbr_core-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

xeze_dbr_core-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file xeze_dbr_core-0.1.1.tar.gz.

File metadata

  • Download URL: xeze_dbr_core-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xeze_dbr_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 69a8ec180e9ea15e6a471f6d481bee358e7f56082cc046c26d241af3adb87b8d
MD5 0c2fa1eb078dddca1c9cda1d62dcf670
BLAKE2b-256 0ddb4cf76c702588f8fc94a798cb43c10492f2587a5f7728df119a7a1136a03f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xeze_dbr_core-0.1.1.tar.gz:

Publisher: pypi-publish-core.yml on Xeze-org/Database-Router

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

File details

Details for the file xeze_dbr_core-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for xeze_dbr_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d3b44632e5d338fea89dcf59ada63ecb2c284cedfd2cd089c98456635622ccf
MD5 a322ea9e496077f57a093278aa6172a8
BLAKE2b-256 0d413aa31b719cb941094e2ae693ab99658c4564d885cae8abf9a8915c11dc1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xeze_dbr_core-0.1.1-py3-none-any.whl:

Publisher: pypi-publish-core.yml on Xeze-org/Database-Router

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