Skip to main content

HVPDB: Secure Embedded NoSQL Database with ACID Transactions

Project description

HVPDB (High Velocity Python Database)

PyPI version Python Versions License Code Style

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

FeaturesInstallationQuick StartCLI PowerBenchmarks


🚀 What is HVPDB?

HVPDB is a high-performance, embedded NoSQL database designed for Python applications that require speed, security, and reliability without the overhead of a dedicated server (like MongoDB or PostgreSQL).

It combines the simplicity of SQLite with the flexibility of Document Stores, powered by modern tech stack: MsgPack serialization, ZStandard compression, and AES-GCM encryption.

"Think of it as SQLite met MongoDB, got married, and went to the gym." 💪

✨ Key Features

  • 🔒 Military-Grade Security: Native AES-256-GCM encryption at rest. Your data is encrypted before it touches the disk.
  • ⚡ Blazing Fast: Optimized Write-Ahead Log (WAL) v2 with batched commits and ZStandard compression.
  • 📦 Transaction Support: Atomic and consistent transactions with WAL-backed commit and rollback. Designed for local and embedded workloads.
  • 🐚 Power Ops Shell: Interactive CLI with syntax highlighting, auto-completion, and live data inspection.
  • 🕸️ Thread-Safe: Built with contextvars for safe concurrency in AsyncIO/FastAPI/Flask environments.
  • 🔍 Smart Query Optimizer: Uses Set Intersection algorithms for O(1) lookups on indexed fields.
  • 🌐 HTTP Server: Built-in REST API server to expose your DB over the network instantly.

📦 Installation

pip install hvpdb

⚡ Quick Start (Python API)

from hvpdb import HVPDB

# 1. Connect (Auto-creates ./hvp/mydb/mydb.hvp)
db = HVPDB("mydb", password="super_secret_key")

# 2. Get a Group (Collection)
users = db.group("users")

# 3. Insert Data (Atomic & Durable)
users.insert({
    "name": "Alice",
    "email": "alice@example.com",
    "role": "admin",
    "stats": {"login_count": 42}
})

# 4. Create Index (Unique Constraint)
users.create_index("email", unique=True)

# 5. Fast Query
admin = users.find_one({"role": "admin"})
print(f"Found admin: {admin['name']}")

# 6. Transaction (ACID)
with db.begin() as txn:
    users.insert({"name": "Bob"})
    users.insert({"name": "Charlie"})
    # If code fails here, Bob and Charlie are rolled back!

db.close()

🖥️ CLI Power (HVPShell)

HVPDB comes with a beautiful, rich-text terminal interface.

1. Initialize a Database:

hvpdb init my_project "secret123"

2. Enter the Shell:

hvpdb shell my_project "secret123"

3. Interactive Magic:

hvpdb [my_project] > target users
hvpdb [my_project] [users] > make name="Dave" role="dev"
hvpdb [my_project] [users] > hunt role="dev"
hvpdb [my_project] [users] > peek full
hvpdb [my_project] [users] > stats login_count

4. Instant API Server:

hvpdb deploy my_project 8080
# Serving HTTP API at http://0.0.0.0:8080 🚀

📊 Benchmarks

Running on standard hardware (NVMe SSD, Ryzen 7):

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

> Benchmarks generated using hvpdb shell > benchmark

📂 Project Structure

When you initialize a database named myapp, HVPDB keeps it organized locally:

./hvp/
  └── myapp/
      ├── myapp.hvp          # Main Data File (Encrypted & Compressed)
      ├── myapp.hvp.log      # Write-Ahead Log (Crash Recovery)
      ├── myapp.hvp.lock     # Process Lock
      └── myapp.hvp.writelock

👥 Who is HVPDB for?

  • Solo developers & indie hackers
  • Small to medium backend teams
  • CLI-first workflows
  • Local-first apps
  • Embedded tools & internal services

📜 License

Proprietary / Closed Source

  • ✅ Free for personal and commercial usage in your projects.
  • No Forking: You may not redistribute modified source code.
  • No Resale: You may not sell this software as a standalone product.

Copyright © 2026 8w6s. All rights reserved.

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

Uploaded Python 3

File details

Details for the file hvpdb-1.0.0.tar.gz.

File metadata

  • Download URL: hvpdb-1.0.0.tar.gz
  • Upload date:
  • Size: 48.2 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.0.tar.gz
Algorithm Hash digest
SHA256 7b498bcc0b3cc7ad372ca5c6b5c5e1aa0a92312c1af87d0adb1b7685cd1036cd
MD5 94870ceee54546366d88c6720f3e1feb
BLAKE2b-256 5ee45814f4b123e9f835e7a6de7b75dee1f3d592296780fbc04f8c48fd69f931

See more details on using hashes here.

Provenance

The following attestation bundles were made for hvpdb-1.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: hvpdb-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 50.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f8dbc89e868d00b1df7983c52cda16f73a72c7abe1ca87f0ac9ba724a5f2434
MD5 7ae3f1e5a6576c326f63bfa7cef8753c
BLAKE2b-256 7258711e2ad2080bf6d36a41d52896674b779e5fb41047663d710f3b4b85fd80

See more details on using hashes here.

Provenance

The following attestation bundles were made for hvpdb-1.0.0-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