Encrypted document DB for Python developers. Like SQLite, but with built-in trust, end-to-end encryption, and a zero-config CLI.
Project description
๐ VaulteDB
SQLite for encrypted documents.
All the simplicity of SQLite โ but your data is always encrypted, always private.
VaulteDB is a zero-config, encrypted document database for Python developers who want built-in security without dealing with cryptography directly.
- โก Fast local JSON-backed store
- ๐ AES-256 encryption using Fernet
- ๐ง Pythonic
.insert(),.get(),.find()API - ๐ง Salt-based key derivation per vault
- ๐ Inspectable, portable
.vaultfile format - ๐งฐ Optional CLI tool for safe metadata inspection
- ๐ Append-only encrypted audit log (optional)
- ๐๏ธ Single-file storage with embedded metadata and salt
๐ Quick Start
from vaultedb import vaultedb
vault = vaultedb.open("notes.vault", "correct horse battery staple")
vault.insert({"_id": "alice", "email": "alice@example.com"})
print(vault.get("alice")['email'])
โจ Why VaulteDB?
- โ SQLCipher: low-level SQL only
- ๐ MongoDB: enterprise-only FLE, complex setup
- โก Evervault: hosted service, not a library
- ๐ vaultedb: open-source, local, encrypted, and simple
โญ Design Principles
๐ Zero-Config Encryption
VaulteDB encrypts every document automatically. Developers only provide a passphrase. vaultedb handles:
- Key derivation (PBKDF2)
- AES-256 encryption (via Fernet)
- Embedded salts
๐ง Salt-Based Key Derivation
Each vault embeds a unique salt. Even with the same passphrase, every vault is isolated.
"salt": "base64-encoded-value"
โ Vault Isolation Guarantee
Same passphrase โ same key. Copying blobs across vaults doesn't work:
vault1 = vaultedb.open("vault1.vault", "hunter2")
vault2 = vaultedb.open("vault2.vault", "hunter2")
vault1.insert({"_id": "secret", "msg": "top secret"})
vault2.store.insert(vault1.store.data["secret"])
from vaultedb.errors import CryptoError
try:
vault2.get("secret")
except CryptoError:
print("โ
Vaults are isolated by salt")
๐ Portable File Format
Each .vault file is valid JSON:
{
"_meta": {
"vault_version": "1.0.0",
"created_at": "...",
"salt": "...",
"app_name": "..."
},
"documents": {
"abc123": {"_id": "abc123", "data": "gAAAAB..."}
}
}
๐ CLI Inspector: Trust Without Decryption
vault inspect notes.vault
python -m vaultedb.cli inspect notes.vault --json --quiet
See vault metadata, salt, and IDs without ever decrypting.
๐๏ธ Logging: Encrypted Audit Trails (Optional)
Enable audit logging:
vault = vaultedb.open("secure.vault", "hunter2", enable_logging=True)
vault.insert({"_id": "day1", "note": "Encrypted entry"})
All actions are encrypted and logged to .vaultlog:
{
"op": "insert",
"_id": "day1",
"at": "2025-05-13T11:00:00Z",
"meta": {}
}
- โ๏ธ Export logs with
vault.get_audit_log().export_json("out.json") - ๐จ Detect tampering: logs can't be forged or decrypted without key
โฌ MVP Status: Complete
This project is currently an MVP focused on local security and DX:
- โ Local document storage
- โ Transparent encryption
- โ Key export
- โ CLI inspector
- โ Optional audit logging
Planned post-MVP:
- Indexing and query optimization
- Vault sync over S3 or filesystem
- Multi-user vault support
๐ Use Cases
- ๐ Local note-taking with privacy
- ๐งโ๐ป AI agents storing context
- ๐ผ Secure local logging in compliance environments
- ๐ Field apps storing offline snapshots securely
๐ Test Coverage
- 94%+ tested
- Core coverage: encryption, storage, logging, passphrase
- CLI tested via subprocess
๐ฆ Installation
pip install vaultedb # or use poetry install if cloning locally
๐ฅ Demo & Examples
example_usage.pyโ CLI-based demodemo_notebook.ipynbโ Interactive walkthrough
๐ Support vaultedb
- โญ Star us on GitHub: vaultedb
- ๐ข Share your feedback
- ๐ฑ Try the demo or install from PyPI
Built for developers who take privacy seriously.
๐ฉ License
MIT ยฉ 2025 VaulteDB Project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vaultedb-1.0.0.tar.gz.
File metadata
- Download URL: vaultedb-1.0.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b2878e81c8f5752942afcbe506b5f76c228acc49e57c44ad0ba2b5fff0acbc3
|
|
| MD5 |
f15a3cbf7548b9fbd516d8b033f025a0
|
|
| BLAKE2b-256 |
5aa55b1d6305842837bb7b4511799c9355e3c91799d7ceb9e0a428e1cfc67f95
|
File details
Details for the file vaultedb-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vaultedb-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323158b69eec7212958b248039fef1c53a50a9acf5208e11482bae2db59f6d43
|
|
| MD5 |
079f4d0dca90457775bce65939ec7395
|
|
| BLAKE2b-256 |
3bca5de64e682f7babb0b7bcf88b584734681552482b0042494a634c1868f669
|