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.1.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.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for jsonql_db-0.1.1.tar.gz
Algorithm Hash digest
SHA256 384fe975d256f7b7bbb04b7f8a978d1fa858b8a8012c0587924689cde4d16ec4
MD5 e01301fd398a25f7300a830990ca2c2b
BLAKE2b-256 aa018660a51f49caf80b5d71411d4e1dd3e98de96d5108ac4a11d496002ba3cd

See more details on using hashes here.

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

Hashes for jsonql_db-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d9169a02c05e280afbedde70c6cfa32f419f5e1be3e2076af6df4b6eb5c8535
MD5 b472a515cadf431db6b70b6fae8f162f
BLAKE2b-256 a21af4f817c0387d7f307933687631effc5b796b7942f38dc8e4a6e3968df842

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