{"id":26787459,"url":"https://github.com/controversial/livejson","last_synced_at":"2025-04-19T19:34:40.361Z","repository":{"id":62576426,"uuid":"60430508","full_name":"controversial/livejson","owner":"controversial","description":"A Python library providing effortless access to JSON files by mimicking an in-memory dict","archived":false,"fork":false,"pushed_at":"2023-07-09T11:10:55.000Z","size":78,"stargazers_count":38,"open_issues_count":6,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T10:13:16.474Z","etag":null,"topics":["json","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/livejson/","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/controversial.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-04T21:14:30.000Z","updated_at":"2024-10-10T00:38:14.000Z","dependencies_parsed_at":"2024-06-21T14:05:33.227Z","dependency_job_id":"17e62110-9840-40ff-b5aa-6825d5c7af61","html_url":"https://github.com/controversial/livejson","commit_stats":{"total_commits":127,"total_committers":6,"mean_commits":"21.166666666666668","dds":"0.11023622047244097","last_synced_commit":"5b6ede437f077c9e25dfde427e1b9a0a235e620f"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controversial%2Flivejson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controversial%2Flivejson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controversial%2Flivejson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controversial%2Flivejson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/controversial","download_url":"https://codeload.github.com/controversial/livejson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249780536,"owners_count":21324567,"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":["json","python"],"created_at":"2025-03-29T12:20:04.147Z","updated_at":"2025-04-19T19:34:40.343Z","avatar_url":"https://github.com/controversial.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003elivejson\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/controversial/livejson\" align=\"center\"\u003e\n        \u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/controversial/livejson.svg?branch=master\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://coveralls.io/github/controversial/livejson?branch=master\" align=\"center\"\u003e\n        \u003cimg alt=\"Coverage Status\" src=\"https://coveralls.io/repos/github/controversial/livejson/badge.svg?branch=master\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.python.org/dev/peps/pep-0008/\" align=\"center\"\u003e\n        \u003cimg alt=\"PEP8\" src=\"https://img.shields.io/badge/PEP8-compliant-brightgreen.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eAn interface to transparently bind Python objects to JSON files, so that all changes made to the object are reflected in the JSON file\u003c/p\u003e\n\n---\n\n\n`livejson` allows you to cleanly manipulate JSON objects as though they were Python `dict`s, with your file transparently updating in the background. It's **pure-python with no dependencies**.\n\n![Demo gif](https://i.imgur.com/yaXzzjG.gif)\n\n`livejson` is:\n\n- **Easy**: use `livejson` with the same interface as Python `list`s and `dict`s, meaning it can basically be used as a drop-in replacement.\n- **Flexible**: `livejson` fully supports complex nestings of `list`s and `dict`s, meaning it can represent any valid JSON file.\n- **Compatible**: `livejson` works on all [versions](https://devguide.python.org/versions/) of Python that are not end-of-life.\n- **Lightweight**: `livejson` is a single file with no external dependencies. Just install and go!\n- **Reliable**: by default, no caching is used. Every single time you access a `livejson.Database`, it's read straight from the file. And every time you write to it, the change is instant. No delays, no conflicts. However, if efficiency is important, you can use the context manager to perform \"grouped writes\", which allow for performing a large number of operations with only one write at the end.\n- **100% test covered** Be confident that `livejson` is working properly\n\n`livejson` can be used for:\n\n- **Database storage**: you can use `livejson` to easily write flexible JSON databases, without having to worry about complex `open` and `close` operations, or learning how to use the `json` module.\n- **Debugging**: You can use `livejson` to “back up” your Python objects to disk. If you use a `livejson.Database` instead of a `dict` or a `list` and your script crashes, you'll still have a hard copy of your object. And you barely had to change any of your code.\n- **General-purpose JSON**: If your script or application needs to interact with JSON files in any way, consider using `livejson`, for simplicity's sake. `livejson` can make your code easier to read and understand, and also save you time.\n\nThanks to [dgelessus](https://github.com/dgelessus) for naming this project.\n\n## Installing\n`livejson` can be easily installed with `pip`.\n```bash\npip install livejson\n```\nAfter installing, you can just `import livejson` from your code!\n\n## Example usage\nBasic usage:\n```python\nimport livejson\nf = livejson.File(\"test.json\")\nf[\"a\"] = \"b\"\n# That's it, the file has been written to!\n```\nAs a context manager:\n```python\nimport livejson\nwith livejson.File(\"test.json\") as f:\n    f[\"a\"] = \"b\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontroversial%2Flivejson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontroversial%2Flivejson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontroversial%2Flivejson/lists"}