Name | json-as-db JSON |
Version |
0.2.4
JSON |
| download |
home_page | |
Summary | Using JSON as very lightweight database |
upload_time | 2023-01-25 14:10:33 |
maintainer | Joonas |
docs_url | None |
author | Joonas |
requires_python | >=3.7,<4.0 |
license | MIT |
keywords |
json
lightweight
database
odm
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# JSON-as-DB
![Python Version Badge] [![RTD](https://readthedocs.org/projects/json-as-db/badge/?version=latest)](https://json-as-db.readthedocs.io/) [![PyTest Badge]](https://github.com/joonas-yoon/json-as-db/actions/workflows/pytest.yml) ![PyPI Version Badge] ![PyPI Download Badge] [![Hits Badge]](#)
Using JSON as very lightweight database
```python
>>> db = Database()
>>> db.load('output.json') # Load database from file
>>> db.add([{ # Add items what you want to add
... "id": "1002",
... "type": "Chocolate"
... })
['FqkmbYFSCRCAHQWydhM69v', 'RUJGcVBFANvNRReXa8U3En']
>>> db.save('output.json', json_kwds={'indent': 4}) # Just save it into file.
```
```js
// output.json
{
"created_at": "2022-12-25T16:50:02.459068",
"creator": "json_as_db",
"data": {
"FqkmbYFSCRCAHQWydhM69v": {
"id": "1001",
"type": "Regular"
},
"RUJGcVBFANvNRReXa8U3En": {
"id": "1002",
"type": "Chocolate"
}
},
"updated_at": "2022-12-28T16:51:36.276790",
"version": "1.0.0"
}
```
## Documentation
- Read the Docs - https://json-as-db.readthedocs.io/
## Installation
Installing via pip:
```bash
pip install json-as-db
```
Installing via GitHub repository,
```bash
git clone https://github.com/joonas-yoon/json-as-db.git
pip install -e json-as-db
```
## Contributing
Contributing guidelines can be found [CONTRIBUTING.md](CONTRIBUTING).
Welcome all contributions to the community and feel free to contribute.
## License
Under the MIT license. See the [LICENSE] file for more info.
[Python Version Badge]: https://img.shields.io/pypi/pyversions/json-as-db?style=flat-square
[PyTest Badge]: https://github.com/joonas-yoon/json-as-db/actions/workflows/pytest.yml/badge.svg
[PyPI Version Badge]: https://img.shields.io/pypi/v/json-as-db?style=flat-square
[PyPI Download Badge]: https://img.shields.io/pypi/dm/json-as-db?style=flat-square
[Hits Badge]: https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjoonas-yoon%2Fjson-as-db
[CONTRIBUTING]: CONTRIBUTING.md
[LICENSE]: LICENSE
Raw data
{
"_id": null,
"home_page": "",
"name": "json-as-db",
"maintainer": "Joonas",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "joonas.yoon@gmail.com",
"keywords": "json,lightweight,database,odm",
"author": "Joonas",
"author_email": "joonas.yoon@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/29/c1/d01caa5f116dc489bbadd1d5ec1aafa879f455b1b50e382a6574370bc596/json_as_db-0.2.4.tar.gz",
"platform": null,
"description": "# JSON-as-DB\n\n![Python Version Badge] [![RTD](https://readthedocs.org/projects/json-as-db/badge/?version=latest)](https://json-as-db.readthedocs.io/) [![PyTest Badge]](https://github.com/joonas-yoon/json-as-db/actions/workflows/pytest.yml) ![PyPI Version Badge] ![PyPI Download Badge] [![Hits Badge]](#)\n\nUsing JSON as very lightweight database\n\n```python\n>>> db = Database()\n>>> db.load('output.json') # Load database from file\n>>> db.add([{ # Add items what you want to add\n... \"id\": \"1002\",\n... \"type\": \"Chocolate\"\n... })\n['FqkmbYFSCRCAHQWydhM69v', 'RUJGcVBFANvNRReXa8U3En']\n>>> db.save('output.json', json_kwds={'indent': 4}) # Just save it into file.\n```\n\n```js\n// output.json\n{\n \"created_at\": \"2022-12-25T16:50:02.459068\",\n \"creator\": \"json_as_db\",\n \"data\": {\n \"FqkmbYFSCRCAHQWydhM69v\": {\n \"id\": \"1001\",\n \"type\": \"Regular\"\n },\n \"RUJGcVBFANvNRReXa8U3En\": {\n \"id\": \"1002\",\n \"type\": \"Chocolate\"\n }\n },\n \"updated_at\": \"2022-12-28T16:51:36.276790\",\n \"version\": \"1.0.0\"\n}\n```\n\n## Documentation\n\n- Read the Docs - https://json-as-db.readthedocs.io/\n\n## Installation\n\nInstalling via pip:\n\n```bash\npip install json-as-db\n```\n\nInstalling via GitHub repository,\n\n```bash\ngit clone https://github.com/joonas-yoon/json-as-db.git\npip install -e json-as-db\n```\n\n## Contributing\n\nContributing guidelines can be found [CONTRIBUTING.md](CONTRIBUTING).\n\nWelcome all contributions to the community and feel free to contribute.\n\n## License\n\nUnder the MIT license. See the [LICENSE] file for more info.\n\n\n[Python Version Badge]: https://img.shields.io/pypi/pyversions/json-as-db?style=flat-square\n[PyTest Badge]: https://github.com/joonas-yoon/json-as-db/actions/workflows/pytest.yml/badge.svg\n[PyPI Version Badge]: https://img.shields.io/pypi/v/json-as-db?style=flat-square\n[PyPI Download Badge]: https://img.shields.io/pypi/dm/json-as-db?style=flat-square\n[Hits Badge]: https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjoonas-yoon%2Fjson-as-db\n[CONTRIBUTING]: CONTRIBUTING.md\n[LICENSE]: LICENSE\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Using JSON as very lightweight database",
"version": "0.2.4",
"split_keywords": [
"json",
"lightweight",
"database",
"odm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "71076809231082c83ce4d49a74811e9ca174188727ae00a88f6187a0eba3f527",
"md5": "309101c84fd9ed14db27120c2a10358a",
"sha256": "19ddaf20c22fa07c89f638da202bedab8daf244794165cc005a4793ab0d9f34d"
},
"downloads": -1,
"filename": "json_as_db-0.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "309101c84fd9ed14db27120c2a10358a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 10953,
"upload_time": "2023-01-25T14:10:31",
"upload_time_iso_8601": "2023-01-25T14:10:31.932720Z",
"url": "https://files.pythonhosted.org/packages/71/07/6809231082c83ce4d49a74811e9ca174188727ae00a88f6187a0eba3f527/json_as_db-0.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "29c1d01caa5f116dc489bbadd1d5ec1aafa879f455b1b50e382a6574370bc596",
"md5": "42ce903aefd5af92fced8a4d2e2b77aa",
"sha256": "282c6a87c843c18309168714b56b9d31aa67902c5c98683dd2875e626e77d53d"
},
"downloads": -1,
"filename": "json_as_db-0.2.4.tar.gz",
"has_sig": false,
"md5_digest": "42ce903aefd5af92fced8a4d2e2b77aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 10221,
"upload_time": "2023-01-25T14:10:33",
"upload_time_iso_8601": "2023-01-25T14:10:33.070504Z",
"url": "https://files.pythonhosted.org/packages/29/c1/d01caa5f116dc489bbadd1d5ec1aafa879f455b1b50e382a6574370bc596/json_as_db-0.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-25 14:10:33",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "json-as-db"
}