Skip to content

takouzlo/jsonql-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONQL-DB — Your Lightweight JSON Database

SQLite, but with human-readable JSON files.
Zero setup. Zero server. Just pure Python and transparency.

🖥️ Download for Windows (No Python needed)

📥 JSONQL-DB v0.1.3 — Windows Standalone

PyPI License Python

✨ Why JSONQL-DB?

Feature SQLite JSONQL-DB
Storage Binary Human-readable JSON
Setup Install Zero install (pure Python)
Transparency Opaque Everything is a file
Ideal for Heavy apps Prototypes, AV tools, edge devices, indie devs

✅ No server • ✅ Thread-safe • ✅ SQL-like queries • ✅ < 300 lines core

⚠️ Not related to json-ql or jsonql.js.org — those are JSON query utilities, not databases.

🚀 Install

pip install jsonql-db

For the GUI browser (Flet-based):

pip install "jsonql-db[browser]"

Quick Start

import jsonql

# Connect (creates folder if needed)
db = jsonql.connect("my_app_data")

# Insert
db.insert("devices", {"name": "Projector", "room": "A101", "ip": "192.168.1.10"})

# Query
devices = db.select("devices", {"room": "A101"})
print(devices)

# SQL-like
result = db.query("SELECT * FROM devices WHERE room = 'A101'")
print(result)

🖥️ GUI Browser Launch the built-in browser:

python -m jsonql.browser

JSONQL Browser

🧠 Philosophy

“If it’s not human-readable, it’s not transparent.”

JSONQL-DB is for developers who value simplicity, portability, and control.

Perfect for:

  • Audiovisual integrators (Crestron, QSC, Extron)
  • IoT edge logging
  • Local Flet/PyQt apps
  • Teaching database basics

📜 License MIT — see LICENSE

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()

About

A lightweight, file-based JSON database with SQL-like interface.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages