{"id":16452575,"url":"https://github.com/agent-hellboy/flask-json-db","last_synced_at":"2025-10-25T20:12:05.313Z","repository":{"id":64988341,"uuid":"580424487","full_name":"Agent-Hellboy/flask-json-db","owner":"Agent-Hellboy","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-20T14:53:00.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T17:05:18.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Agent-Hellboy.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-20T14:27:34.000Z","updated_at":"2022-12-22T07:13:23.000Z","dependencies_parsed_at":"2022-12-20T17:02:10.522Z","dependency_job_id":null,"html_url":"https://github.com/Agent-Hellboy/flask-json-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-json-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-json-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-json-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-json-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agent-Hellboy","download_url":"https://codeload.github.com/Agent-Hellboy/flask-json-db/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240893947,"owners_count":19874711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T10:13:12.456Z","updated_at":"2025-10-25T20:12:05.184Z","avatar_url":"https://github.com/Agent-Hellboy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"flask-json-db\n=============\n\nA flask extension to log a variable value inside view in a JSON file\n\n\nInstallation\n============\n\nFor stable version \n   - pip install flask-json-db\n\nFor developement \n   - git clone https://github.com/Agent-Hellboy/flask-json-db\n   - cd flask-json-db\n   - python -m venv .venv \n   - source .venv/bin/activate\n\nExample\n=======\n\n.. code:: py\n\n    from flask import Flask\n    from flask_json_db import JSONDB\n\n    app = Flask(__name__)\n    app.config[\"JSONFILE\"] = \"custom.json\" #optional \n    json_db = JSONDB(app)\n\n    @app.route('/')\n    def hello_world():\n        json_db.write({\"landing_view_var\":\"landing_view_var_value\"})\n        return 'Hello World'\n\n    @app.route(\"/home\")\n    def home():\n        json_db.write({\"home_var\":[\"jshajdhjs\"]})\n        return 'home'\n\n    @app.route(\"/new_home\")\n    def new_home():\n        db.write({\"new_home_var\": \"new_home_var_value\"})\n        # this raise exception and got handled in app_teardown\n        return \"new_home\"\n\n    if __name__ == '__main__':\n        app.run()\n\n\n open the custom.json and get to know about these variable values\n\nGeneral Info\n============\n\n   - I don't know how can it be helpful but it is helpful for me :)\n\n   \nContributing\n============\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fflask-json-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagent-hellboy%2Fflask-json-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fflask-json-db/lists"}