From 32a06a3f0bffd78e43958769ffd94a1156f82ac7 Mon Sep 17 00:00:00 2001 From: RGBCube <78925721+RGBCube@users.noreply.github.com> Date: Wed, 12 Jan 2022 21:18:02 +0300 Subject: [PATCH] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 525f438..683cd63 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # ClutterDB extremely simple JSON database which behaves like a dict 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 ```python from db import ClutterDB