Using JSON as very lightweight database
Project description
JSON-as-DB
Using JSON as very lightweight database
>>> 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.
// 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:
pip install json-as-db
Installing via GitHub repository,
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.
Welcome all contributions to the community and feel free to contribute.
License
Under the MIT license. See the LICENSE file for more info.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file json_as_db-0.2.4.tar.gz.
File metadata
- Download URL: json_as_db-0.2.4.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282c6a87c843c18309168714b56b9d31aa67902c5c98683dd2875e626e77d53d
|
|
| MD5 |
42ce903aefd5af92fced8a4d2e2b77aa
|
|
| BLAKE2b-256 |
29c1d01caa5f116dc489bbadd1d5ec1aafa879f455b1b50e382a6574370bc596
|
File details
Details for the file json_as_db-0.2.4-py3-none-any.whl.
File metadata
- Download URL: json_as_db-0.2.4-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ddaf20c22fa07c89f638da202bedab8daf244794165cc005a4793ab0d9f34d
|
|
| MD5 |
309101c84fd9ed14db27120c2a10358a
|
|
| BLAKE2b-256 |
71076809231082c83ce4d49a74811e9ca174188727ae00a88f6187a0eba3f527
|