mirror of
https://github.com/RGBCube/JsonWrapper
synced 2025-07-27 11:47:45 +00:00
Update README.md
This commit is contained in:
parent
c22c2a77dd
commit
6e7295262e
1 changed files with 7 additions and 2 deletions
|
@ -1,10 +1,15 @@
|
|||
# ClutterDB
|
||||
Extremely simple JSON database which behaves like a dict.
|
||||
|
||||
This was made for ClutterBot (still in development).
|
||||
# Usage
|
||||
Clone [this](https://github.com/Clutter-Cluster/ClutterDB/blob/main/db.py) file into your project folder.
|
||||
|
||||
Add `from db import CluttterDB` to the top of your project.
|
||||
# Docs
|
||||
## `db.set(key: str, value)`
|
||||
Sets the key to the value in the JSON.
|
||||
## `db.get(key: str, default=None)`
|
||||
## `db.get(key: str, *, default=None)`
|
||||
Returns the value of the key in the json, if the key isn't set in the json, it returns the default kwarg.
|
||||
## `db.all()`
|
||||
Returns all the JSON data.
|
||||
|
@ -16,7 +21,7 @@ Note that this will not do anything if the key isn't set in the JSON.
|
|||
Deletes everything in the JSON.
|
||||
|
||||
Use with caution.
|
||||
# Usage
|
||||
# Examples
|
||||
Code:
|
||||
```python
|
||||
from db import ClutterDB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue