1
Fork 0
mirror of https://github.com/RGBCube/JsonWrapper synced 2025-07-27 11:47:45 +00:00

Update README.md

This commit is contained in:
RGBCube 2022-01-15 15:35:07 +03:00 committed by GitHub
parent 493848dba0
commit 7c9a2e3ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ Output
{'test': 123}
```
## `db.get()`
###
### Normal usage
Code
```python
from db import ClutterDB
@ -52,6 +52,36 @@ db.set("test", 123)
data = db.get("test")
print(data)
```
Output
```
123
```
### Using without `default` kwarg
Code
```python
from db import ClutterDB
db = ClutterDB("db.json")
data = db.get("test")
print(data)
```
Output
```
None
```
### Using with `default` kwarg
Code
```python
from db import ClutterDB
db = ClutterDB("db.json")
data = db.get("test", default=123)
print(data)
```
Output