jsonql-db


Namejsonql-db JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/takouzlo/jsonql-db
SummaryA lightweight, file-based JSON database with SQL-like interface
upload_time2025-11-11 18:48:50
maintainerNone
docs_urlNone
authorFBF
requires_python>=3.7
licenseMIT
keywords json database sqlite alternative lightweight file-based
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JSONQL-DB — Your Lightweight JSON Database

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

[![PyPI](https://img.shields.io/pypi/v/jsonql-db.svg)](https://pypi.org/project/jsonql-db/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Python](https://img.shields.io/pypi/pyversions/jsonql-db)](https://pypi.org/project/jsonql-db/)

## ✨ 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`](https://pypi.org/project/json-ql/) or [`jsonql.js.org`](https://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](https://raw.githubusercontent.com/takouzlo/jsonql-db/main/jqlFlet.png)


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





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/takouzlo/jsonql-db",
    "name": "jsonql-db",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "json database sqlite alternative lightweight file-based",
    "author": "FBF",
    "author_email": "f.bfalik@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fa/ba/1f2bb194ba2412e633c153da74204c29c6638db9072d76b49bd442cb25d5/jsonql_db-0.1.3.tar.gz",
    "platform": null,
    "description": "# JSONQL-DB \u2014 Your Lightweight JSON Database\r\n\r\n> **SQLite, but with human-readable JSON files.**  \r\n> Zero setup. Zero server. Just pure Python and transparency.\r\n\r\n[![PyPI](https://img.shields.io/pypi/v/jsonql-db.svg)](https://pypi.org/project/jsonql-db/)\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\r\n[![Python](https://img.shields.io/pypi/pyversions/jsonql-db)](https://pypi.org/project/jsonql-db/)\r\n\r\n## \u2728 Why JSONQL-DB?\r\n\r\n| Feature          | SQLite        | JSONQL-DB               |\r\n|------------------|---------------|-------------------------|\r\n| **Storage**      | Binary        | **Human-readable JSON** |\r\n| **Setup**        | Install       | **Zero install** (pure Python) |\r\n| **Transparency** | Opaque        | **Everything is a file** |\r\n| **Ideal for**    | Heavy apps    | **Prototypes, AV tools, edge devices, indie devs** |\r\n\r\n\u2705 No server \u2022 \u2705 Thread-safe \u2022 \u2705 SQL-like queries \u2022 \u2705 < 300 lines core\r\n\r\n> \u26a0\ufe0f **Not related to** [`json-ql`](https://pypi.org/project/json-ql/) or [`jsonql.js.org`](https://jsonql.js.org) \u2014 those are **JSON query utilities**, not databases.\r\n\r\n---\r\n\r\n## \ud83d\ude80 Install\r\n\r\n\r\npip install jsonql-db\r\n\r\n\r\nFor the GUI browser (Flet-based):\r\n\r\npip install \"jsonql-db[browser]\"\r\n\r\nQuick Start\r\n\r\n    import jsonql\r\n\r\n    # Connect (creates folder if needed)\r\n    db = jsonql.connect(\"my_app_data\")\r\n\r\n    # Insert\r\n    db.insert(\"devices\", {\"name\": \"Projector\", \"room\": \"A101\", \"ip\": \"192.168.1.10\"})\r\n\r\n    # Query\r\n    devices = db.select(\"devices\", {\"room\": \"A101\"})\r\n    print(devices)\r\n\r\n    # SQL-like\r\n    result = db.query(\"SELECT * FROM devices WHERE room = 'A101'\")\r\n    print(result)\r\n\r\n\r\n\ud83d\udda5\ufe0f GUI Browser\r\nLaunch the built-in browser:\r\n\r\npython -m jsonql.browser\r\n\r\n![JSONQL Browser](https://raw.githubusercontent.com/takouzlo/jsonql-db/main/jqlFlet.png)\r\n\r\n\r\n\ud83e\udde0 Philosophy\r\n\r\n\u201cIf it\u2019s not human-readable, it\u2019s not transparent.\u201d\r\n\r\nJSONQL-DB is for developers who value simplicity, portability, and control. \r\n\r\nPerfect for:\r\n\r\n- Audiovisual integrators (Crestron, QSC, Extron)\r\n- IoT edge logging\r\n- Local Flet/PyQt apps\r\n- Teaching database basics\r\n\r\n\r\n\ud83d\udcdc License\r\nMIT \u2014 see LICENSE\r\n\r\n# demo.py\r\n    import jsonql\r\n\r\n    def main():\r\n        db = jsonql.connect(\"demo_db\")\r\n        \r\n        # Insert\r\n        dev_id = db.insert(\"devices\", {\r\n            \"name\": \"Epson L710U\",\r\n            \"type\": \"projector\",\r\n            \"room\": \"A101\",\r\n            \"ip\": \"192.168.10.50\"\r\n        })\r\n        print(f\"\u2705 Inserted device ID: {dev_id}\")\r\n\r\n        # Select\r\n        devices = db.select(\"devices\", {\"room\": \"A101\"})\r\n        print(\"\ud83d\udd0d Devices in A101:\", devices)\r\n\r\n        # SQL Query\r\n        result = db.query(\"SELECT * FROM devices WHERE type = 'projector'\")\r\n        print(\"\ud83d\udcbb SQL Result:\", result)\r\n\r\n    if __name__ == \"__main__\":\r\n        main()\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight, file-based JSON database with SQL-like interface",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/takouzlo/jsonql-db"
    },
    "split_keywords": [
        "json",
        "database",
        "sqlite",
        "alternative",
        "lightweight",
        "file-based"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fa45e30243131a78b014911462c4295034ad3bc01bed0461fa758b825fcd6d6d",
                "md5": "3f18be0276dcc2a81fa28366feba8e62",
                "sha256": "470a386e8be99e61c4664d4cf62c295d4edd6242eb291f3ee7f1a0267bbbc5e4"
            },
            "downloads": -1,
            "filename": "jsonql_db-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f18be0276dcc2a81fa28366feba8e62",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9295,
            "upload_time": "2025-11-11T18:48:49",
            "upload_time_iso_8601": "2025-11-11T18:48:49.607612Z",
            "url": "https://files.pythonhosted.org/packages/fa/45/e30243131a78b014911462c4295034ad3bc01bed0461fa758b825fcd6d6d/jsonql_db-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "faba1f2bb194ba2412e633c153da74204c29c6638db9072d76b49bd442cb25d5",
                "md5": "9e38d0ee191f1515569e4d97ae05c13b",
                "sha256": "f3d2411d2af35eddfdad5e0600357dce84b69f201421fb61954bde1db7ee4c35"
            },
            "downloads": -1,
            "filename": "jsonql_db-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "9e38d0ee191f1515569e4d97ae05c13b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9928,
            "upload_time": "2025-11-11T18:48:50",
            "upload_time_iso_8601": "2025-11-11T18:48:50.416190Z",
            "url": "https://files.pythonhosted.org/packages/fa/ba/1f2bb194ba2412e633c153da74204c29c6638db9072d76b49bd442cb25d5/jsonql_db-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-11 18:48:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "takouzlo",
    "github_project": "jsonql-db",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jsonql-db"
}
        
FBF
Elapsed time: 0.60605s