File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change 44
55Using JSON as very lightweight database
66
7- - Documentation: https://json-as-db.readthedocs.io/
7+ ``` python
8+ >> > db = client.create_database(' table_1' )
9+ >> > db.add([{
10+ ... " id" : " 1001" ,
11+ ... " type" : " Regular"
12+ ... }, {
13+ ... " id" : " 1002" ,
14+ ... " type" : " Chocolate"
15+ ... })
16+ [' FqkmbYFSCRCAHQWydhM69v' , ' RUJGcVBFANvNRReXa8U3En' ]
17+ >> > db.save(json_kwds = {' indent' : 4 })
18+ ```
19+
20+ ```js
21+ // table_1.json
22+ {
23+ " created_at" : " 2022-12-25T16:50:02.459068" ,
24+ " creator" : " json_as_db" ,
25+ " data" : {
26+ " FqkmbYFSCRCAHQWydhM69v" : {
27+ " id" : " 1001" ,
28+ " type" : " Regular"
29+ },
30+ " RUJGcVBFANvNRReXa8U3En" : {
31+ " id" : " 1002" ,
32+ " type" : " Chocolate"
33+ }
34+ },
35+ " updated_at" : " 2022-12-25T16:51:36.276790" ,
36+ " version" : " 1.0.0"
37+ }
38+ ```
39+
40+ # # Documentation
41+
42+ - Read the Docs - https:// json- as - db.readthedocs.io/
843
944# # Installation
1045
You can’t perform that action at this time.
0 commit comments