pysonDB

A Simple , ☁️ Lightweight , 💪 Efficent JSON based database for 🐍 Python. PysonDB-V2 has been released ⬇️

View on GitHub

PysonDB

Search using Regex


JSON file:file.json

{"data": [{"name": "pysondb", "type": "DB"},
        {"name": "pysondb-cli", "type": "CLI"},
        {"name": "fire", "type": "CLI"},
        {"name": "stuff.py", "type": "GUI"},
        {"name": "def23@c-py", "type": "TUI"},
        {"name": "stuff(py", "type": "GUI"},
]}

reSearch(key, regex, objectify=False)

>> from pysondb import db
>> a=db.getDb("file.json")
>> print(a.reSearch("name", r"\w{3}\d{2}@c-py"))
>> [{'name': 'def23@c-py', 'type': 'TUI', 'id': 200151702869331613}]
>> print(a.reSearch("name", "stuff\(py"))
[{'name': 'stuff(py', 'type': 'GUI', 'id': 115618300909661724}]