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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xeze_dbr_core-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for xeze_dbr_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d778721a67a6c1bcfcde9c46c75fa2f90a7c8826c6f2b6857970883e4854a4f
MD5 b15d07819ee734a29a7264864cc05680
BLAKE2b-256 c105c7fd1b562b79b3be55cd8d6e2e2e034cd174607cb0aa2eae62ed0e284bea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xeze_dbr_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for xeze_dbr_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fd077577eae9ab4000bf460c8a7e9c96b7f4e8ad977c088753ab16a871dc25b
MD5 06e7ee5fe5c131ed32e0a4d037ef36dd
BLAKE2b-256 411811a12607a8c79221acab8d4b8e59a3189d1d8e89fd91c3aca91b52f6e002

See more details on using hashes here.

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