A lightweight encrypted local database using dictionary-based storage
Project description
MineDB
MineDB is a lightweight, encrypted, dictionary-based local database written in Python. It is designed to be simple, schema-safe, and usable directly after installation without requiring any external database server.
MineDB is ideal for:
- Small to medium projects
- Local persistence
- Configuration storage
- Lightweight applications where SQLite or full databases are overkill
FEATURES
- Encrypted local storage (Fernet encryption)
- Pure Python, pip-installable
- Schema-safe operations (no silent corruption)
- Dictionary-based column-oriented storage
- Safe schema evolution (add/drop/rename fields)
- Fully tested with pytest
- No external database required
INSTALLATION
pip install minedb
QUICK START
from MineDB import MineDB
db = MineDB()
db.createDB("testdb") db.createCollection( "testdb", "users", id="int", active="bool" )
db.load(id=1, active=True) db.load(id=2, active=False)
db.modify("id", 1, "active", False) db.remove("id", 2)
db.save()
HOW MINEDB WORKS
- Data is stored as encrypted JSON on disk
- Each collection uses column-oriented storage
- All operations enforce schema consistency
- Partial writes and index drift are prevented by design
MineDB guarantees that all fields in a collection always remain aligned.
SCHEMA OPERATIONS
Add field: db.alterAddField("testdb", "users", "score", "float")
Drop field: db.alterDropField("testdb", "users", "score")
Change field type (safe conversion): db.alterFieldType("testdb", "users", "active", "int")
ENCRYPTION
MineDB uses cryptography.Fernet for encryption.
- Data is always stored encrypted on disk
- Encryption key is generated on first run
- Key is reused safely across sessions
Note: MineDB encryption is intended for local protection, not high-threat adversarial environments.
TESTING
Run tests using: pytest
REQUIREMENTS
Python 3.9 or higher cryptography
LICENSE
MIT License (see LICENSE.txt)
AUTHOR
Harsh Singh
DISCLAIMER
MineDB is intended for local and lightweight use cases. It is not a replacement for full-scale database systems.
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
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 minedb-1.0.0.tar.gz.
File metadata
- Download URL: minedb-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c610fcb179433d685902b116b64a65eec97bfc33b8e349247c1fdba50d5d9ea
|
|
| MD5 |
84867d502fbd649584a21633b543f1a2
|
|
| BLAKE2b-256 |
2800690952df74b3cf266f4a08275a7ef5fe6a132792f595cc1e9ad579ad5a84
|
File details
Details for the file minedb-1.0.0-py3-none-any.whl.
File metadata
- Download URL: minedb-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef911b2dd42ac32f6fb734a8d63a48f1b5afe3e33c37952d354eeffec633b74f
|
|
| MD5 |
8b3ea0c920817182f750a7ff7ec5c4d8
|
|
| BLAKE2b-256 |
673c75472f6a302e77d76cde589e5351e9c8aabefda23d853f2f42b277ef7577
|