A lightweight, file-based JSON database with SQL-like interface
Project description
JSONQL — Lightweight JSON Database
SQLite, but with JSON files.
A simple, transparent, file-based database for local apps, prototypes, and edge devices.
✅ No server • ✅ No setup • ✅ Just JSON files
✅ SQL-like queries • ✅ Thread-safe • ✅ < 300 lines core
⚠️ Not related to
json-ql(PyPI) orjsonql.js.org— those are JSON query tools, not databases.
Install
pip install jsonql
For the GUI browser (Flet-based):
``` bash
pip install "jsonql[browser]"
Quick Start
import jsonql
db = jsonql.connect("my_data") # creates my_data/ folder
# Insert
db.insert("devices", {"name": "Projector", "room": "A101"})
# Query
print(db.select("devices", {"room": "A101"}))
# SQL-like
print(db.query("SELECT * FROM devices WHERE room = 'A101'"))
GUI Browser
``` bash
python -m jsonql.browser

Why JSONQL?
Feature SQLite JSONQL
Storage format Binary Human-readable JSON
Setup Install required Zero install (pure Python)
Transparency Opaque Everything is a file
Ideal for Heavy apps Lightweight tools, AV, IoT, prototypes
License
MIT — see LICENSE
```python
# demo.py
import jsonql
def main():
db = jsonql.connect("demo_db")
# Insert
dev_id = db.insert("devices", {
"name": "Epson L710U",
"type": "projector",
"room": "A101",
"ip": "192.168.10.50"
})
print(f"✅ Inserted device ID: {dev_id}")
# Select
devices = db.select("devices", {"room": "A101"})
print("🔍 Devices in A101:", devices)
# SQL Query
result = db.query("SELECT * FROM devices WHERE type = 'projector'")
print("💻 SQL Result:", result)
if __name__ == "__main__":
main()
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 jsonql_db-0.1.1.tar.gz.
File metadata
- Download URL: jsonql_db-0.1.1.tar.gz
- Upload date:
- Size: 9.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 |
384fe975d256f7b7bbb04b7f8a978d1fa858b8a8012c0587924689cde4d16ec4
|
|
| MD5 |
e01301fd398a25f7300a830990ca2c2b
|
|
| BLAKE2b-256 |
aa018660a51f49caf80b5d71411d4e1dd3e98de96d5108ac4a11d496002ba3cd
|
File details
Details for the file jsonql_db-0.1.1-py3-none-any.whl.
File metadata
- Download URL: jsonql_db-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
4d9169a02c05e280afbedde70c6cfa32f419f5e1be3e2076af6df4b6eb5c8535
|
|
| MD5 |
b472a515cadf431db6b70b6fae8f162f
|
|
| BLAKE2b-256 |
a21af4f817c0387d7f307933687631effc5b796b7942f38dc8e4a6e3968df842
|