Skip to main content

High Velocity Python Database (NoSQL, Embedded, Encrypted)

Project description

HVPDB (High Velocity Python Database)

PyPI version Python Versions License Code Style

The Secure, Embedded, NoSQL Database for Modern Python Apps.

OverviewConceptsInstallationQuick StartBenchmarks


🚀 What is HVPDB?

HVPDB is a local-first, embedded NoSQL database for Python.

It is designed for developers who want:

  • A simple database they fully control
  • Strong encryption by default
  • High-speed local reads/writes
  • No external DB server (no MongoDB / Postgres daemon)

HVPDB combines ideas from:

  • SQLite → embedded, file-based
  • MongoDB → document-oriented
  • Linux tools → CLI-first workflow

Under the hood, it uses:

  • MsgPack for fast serialization
  • ZStandard for compression
  • AES-256-GCM for authenticated encryption

A private, encrypted data store you ship with your app.


🧠 Core Concepts (Important – Read This First)

1. Embedded, Not a Server

HVPDB runs inside your Python process.

  • ❌ No background daemon
  • ❌ No TCP port unless you explicitly deploy
  • ✅ Just a file + Python API
from hvpdb import HVPDB
db = HVPDB("mydb", password="secret")

2. Group ≠ Collection ≠ Table

HVPDB intentionally avoids SQL/Mongo terminology.

HVPDB Term Meaning

Database A folder containing encrypted files Group A logical set of documents Document A Python dict with _id

users = db.group("users")
users.insert({"name": "Alice"})

3. Memory-First, Disk-Safe

Reads are memory-first → extremely fast

Writes go through WAL (Write-Ahead Log)

Disk data is always encrypted

Result:

Fast developer experience

Safe crash recovery

Predictable performance


4. Two Ways to Use HVPDB

Mode Purpose

Python API Application logic HVPShell Human interaction, debugging, inspection

HVPShell is a database editor, not the database itself.


✨ Key Features

🔒 Encryption by Default AES-256-GCM encryption at rest.

⚡ High Performance WAL v2, batched commits, compressed storage.

📦 Transactions (ACID) Atomic commits with rollback support.

🐚 HVPShell (Ops Shell) Interactive CLI with:

auto-complete

rich tables

schema inference

audit & history tools

🕸️ Thread-Safe Safe for FastAPI / AsyncIO / Flask via contextvars.

🌐 Optional HTTP Server Expose your DB via REST when needed.


📦 Installation

pip install hvpdb

⚡ Quick Start (Python API)

from hvpdb import HVPDB

db = HVPDB("mydb", password="super_secret_key")

users = db.group("users")

users.insert({
    "name": "Alice",
    "email": "alice@example.com",
    "role": "admin"
})

users.create_index("email", unique=True)

admin = users.find_one({"role": "admin"})
print(admin["name"])

with db.begin():
    users.insert({"name": "Bob"})
    users.insert({"name": "Charlie"})

db.close()

🖥️ CLI Power (HVPShell)

Initialize database

hvpdb init my_project "secret123"

Enter shell

hvpdb shell my_project "secret123"

Example workflow

target users
make name="Dave" role="dev"
hunt role="dev"
peek
stats login_count

Deploy as API (optional)

hvpdb deploy my_project 8080

📊 Benchmarks

Running on mid-range hardware (Ryzen 7, NVMe SSD):

Operation Ops/Sec Note
Write ~14,000 Batched WAL Commit
Read ~500k+ Memory-first Cache
Index Lookup O(1) Hash Map

Generated via hvpdb shell > benchmark


📂 Project Structure

./hvp/
  └── myapp/
      ├── myapp.hvp          # Encrypted data
      ├── myapp.hvp.log      # WAL
      ├── myapp.hvp.lock
      └── myapp.hvp.writelock

Each database lives in its own folder for clarity and isolation.


👥 Who is HVPDB for?

  • Solo developers

  • Indie hackers

  • Internal tools

  • Security-sensitive apps

  • CLI-first workflows

Not designed for:

  • Massive distributed clusters

  • Multi-terabyte analytics

  • Replacing PostgreSQL at scale

⚠️ Known Limitations

  • Termux / Android: Due to filesystem restrictions (lack of full chmod/flock support on shared storage/FUSE), you may encounter [Errno 38] Function not implemented or permission warnings. This is a platform limitation that cannot be fully resolved in version 1.0.2.

📜 License

Apache License 2.0

✅ Free for personal and commercial use

✅ Modification and redistribution allowed

❗ You may NOT use the name HVPDB, logo, or branding to promote derived products

See LICENSE and TRADEMARK.md for details.

Copyright © 2026 8w6s

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

hvpdb-1.0.7.post1.tar.gz (91.0 kB view details)

Uploaded Source

Built Distribution

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

hvpdb-1.0.7.post1-py3-none-any.whl (91.5 kB view details)

Uploaded Python 3

File details

Details for the file hvpdb-1.0.7.post1.tar.gz.

File metadata

  • Download URL: hvpdb-1.0.7.post1.tar.gz
  • Upload date:
  • Size: 91.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hvpdb-1.0.7.post1.tar.gz
Algorithm Hash digest
SHA256 7e55d4a002a3268132af57aeb8039ac030fe577d95ae32f5e37d8b044ee5392c
MD5 5b529a1f16243637bb3da603809b92d2
BLAKE2b-256 24b55126be625d8c5150f8df26e659bb0f63dd4c4579d9792c0f7ed45942661e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hvpdb-1.0.7.post1.tar.gz:

Publisher: workflow.yml on 8w6s/hvpdb

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

File details

Details for the file hvpdb-1.0.7.post1-py3-none-any.whl.

File metadata

  • Download URL: hvpdb-1.0.7.post1-py3-none-any.whl
  • Upload date:
  • Size: 91.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hvpdb-1.0.7.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dc111f31be03ebe3a861c321927069a91e3a28cb3cbc58206508fd64c8c7836
MD5 823c25bb703915c8b22e61da76b7ca88
BLAKE2b-256 280d89df83f3105ea589ce608466eee652d51adc74a8041dd6ff2c68b1a382ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for hvpdb-1.0.7.post1-py3-none-any.whl:

Publisher: workflow.yml on 8w6s/hvpdb

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