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.
Release files for json-as-db 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| json_as_db-0.2.4.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| json_as_db-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / json_as_db-0.2.4.tar.gz
| Download URL | json_as_db-0.2.4.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
282c6a87c843c18309168714b56b9d31aa67902c5c98683dd2875e626e77d53d
|
|
BLAKE2b-256 checksum How to use checksums |
29c1d01caa5f116dc489bbadd1d5ec1aafa879f455b1b50e382a6574370bc596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
|
Release files / json_as_db-0.2.4-py3-none-any.whl
| Download URL | json_as_db-0.2.4-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19ddaf20c22fa07c89f638da202bedab8daf244794165cc005a4793ab0d9f34d
|
|
BLAKE2b-256 checksum How to use checksums |
71076809231082c83ce4d49a74811e9ca174188727ae00a88f6187a0eba3f527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
|