A lightweight JSON-based flat file database system.
Project description
jflatdb
๐ jflatdb is a lightweight, file-based JSON database system designed for developers who want the simplicity of NoSQL with query features inspired by SQL.
No servers, no external dependencies โ just plug-and-play storage with indexing, queries, and persistence.
๐ Table of Contents
๐ Features
- ๐ฆ JSON-powered storage โ human-readable, lightweight, and portable
- โก Fast querying with indexes โ supports filters, conditions, and sorting
- ๐ Built-in functions โ string, date/time, and aggregation functions
- ๐ Security & validation โ encryption, constraints, and safe writes
- ๐ Zero setup โ no database server needed, runs in pure Python
๐ฆ Installation
pip install jflatdb
or from source
git clone https://github.com/jflatdb/jflatdb.git
cd jflatdb
pip install .
Usage
from jflatdb.database import Database
db = Database("users.json", password="your-password")
# Create or insert data
db.insert({"name": "Akki", "email": "akki@example.com"})
# Find records
users = db.find({"name": "Akki"})
# Advanced queries with operators
# Greater than, less than, etc.
young_users = db.find({"age": {"$gt": 18, "$lt": 30}})
# IN operator
specific_ids = db.find({"id": {"$in": [1, 2, 3]}})
# LIKE for pattern matching
names_starting_with_a = db.find({"name": {"$like": "A%"}})
# BETWEEN
ages_in_range = db.find({"age": {"$between": [20, 30]}})
# Update records
db.update({"name": "Akki"}, {"email": "new@email.com"})
# Delete records
db.delete({"name": "Akki"})
๐ Project Structure
jflatdb/
โโโ jflatdb/
โ โโโ __init__.py
โ โโโ database.py
โ โโโ query_engine.py
โ โโโ indexing.py
| โโโ scheme.py
โโโ tests/
โโโ examples/
โโโ setup.py
โโโ README.md
โโโ LICENSE
๐ Contributors Leaderboard
๐ค Contributing
We welcome contributions from the community!
To get started:
Fork the repo
Create a new branch: git checkout -b feature-name
Make your changes and commit: git commit -m 'Add feature'
Push to your branch: git push origin feature-name
Open a Pull Request
Please read our CONTRIBUTING.md for full guidelines.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ฌ Join the Community
๐ Credits
Developed and maintained by Akki.
๐ Support & Contributions
Your contributions make this project better โ whether it's reporting a bug, suggesting a feature, improving the documentation, or writing code. We welcome developers of all levels to participate!
If you like this project, consider โญ starring it and sharing it with others.
Together, letโs build something awesome with jflatdb.
Happy coding! ๐
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 jflatdb-1.0.1.tar.gz.
File metadata
- Download URL: jflatdb-1.0.1.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f07dd2ad797e6f086e29ce9efdfb41510e31246484490492db62af54049d821
|
|
| MD5 |
afd5f4ebec080a239d0454329e1a983c
|
|
| BLAKE2b-256 |
ed23a1d4790270fe86d6aa4f6b9f3d17076c4b965833b553c044b6ba6e079391
|
Provenance
The following attestation bundles were made for jflatdb-1.0.1.tar.gz:
Publisher:
publish.yml on jflatdb/jflatdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jflatdb-1.0.1.tar.gz -
Subject digest:
7f07dd2ad797e6f086e29ce9efdfb41510e31246484490492db62af54049d821 - Sigstore transparency entry: 585034645
- Sigstore integration time:
-
Permalink:
jflatdb/jflatdb@a9b1c07e6643462b383a9a8f98662639d9ef1df7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/jflatdb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9b1c07e6643462b383a9a8f98662639d9ef1df7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jflatdb-1.0.1-py3-none-any.whl.
File metadata
- Download URL: jflatdb-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0012a9be248973e13d80e4de62a906d06e43c76d537aeec895b8f9da733c059c
|
|
| MD5 |
7ae0834b8879bc753001c08c92ef13a1
|
|
| BLAKE2b-256 |
fe0dcf5b587e744d5b26d9974abaeb4d86d23ca739a3e23e4a811e071c9c0ab6
|
Provenance
The following attestation bundles were made for jflatdb-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on jflatdb/jflatdb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jflatdb-1.0.1-py3-none-any.whl -
Subject digest:
0012a9be248973e13d80e4de62a906d06e43c76d537aeec895b8f9da733c059c - Sigstore transparency entry: 585034648
- Sigstore integration time:
-
Permalink:
jflatdb/jflatdb@a9b1c07e6643462b383a9a8f98662639d9ef1df7 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/jflatdb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9b1c07e6643462b383a9a8f98662639d9ef1df7 -
Trigger Event:
push
-
Statement type: