1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2025-07-27 19:57:44 +00:00

Update README.md

This commit is contained in:
RGBCube 2022-01-12 21:18:02 +03:00 committed by GitHub
parent 6a3ea28121
commit 32a06a3f0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,17 @@
# ClutterDB # ClutterDB
extremely simple JSON database which behaves like a dict extremely simple JSON database which behaves like a dict
this was made for ClutterBot (still in development) this was made for ClutterBot (still in development)
# Docs
## `db.set(key: str, value)`
Sets the key to the value in the JSON.
## `db.rem(key: str)`
Removes the key and value pair from the JSON.
Note that this will not do anything if the key isn't set in the JSON.
## `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.nuke()`
Deletes everything in the JSON.
Use with caution.
# Usage # Usage
```python ```python
from db import ClutterDB from db import ClutterDB