Skip to main content

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.

PyPI License

No server • ✅ No setup • ✅ Just JSON files
SQL-like queries • ✅ Thread-safe • ✅ < 300 lines core

⚠️ Not related to json-ql (PyPI) or jsonql.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

![alt text](jqlFlet.png)

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

jsonql_db-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsonql_db-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file jsonql_db-0.1.0.tar.gz.

File metadata

  • Download URL: jsonql_db-0.1.0.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

Hashes for jsonql_db-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76971c6678f0dcb6f30d6a2c63d4a5f95599bb290d53b18054b310877befb822
MD5 6b737136326f47616fd902ed18c490c5
BLAKE2b-256 926d15c22047554e8f150084900ad1633c934430537387179bd7b536ac1ffc88

See more details on using hashes here.

File details

Details for the file jsonql_db-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jsonql_db-0.1.0-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

Hashes for jsonql_db-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76fdb02340763a379e3ad3960a3943fb5dd72874cb0c2033c2196b94f3870c5f
MD5 cecd28ba92de196830c8a085c81ef6e6
BLAKE2b-256 df733155a02fc96e457b18de2faf38828397d32a344e6a7155fe6df59de1da0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page