catbase-1.0.0
توضیحات
JSON-based database you were dreaming of!
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | catbase-1.0.0 |
| نام | catbase |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Milenakos |
| ایمیل نویسنده | business@milenakos.tk |
| آدرس صفحه اصلی | https://github.com/milena-kos/catbase |
| آدرس اینترنتی | https://pypi.org/project/catbase/ |
| مجوز | - |
# CatBase
JSON-based database you were dreaming of!
## Quickstart
```py
from catbase import CatDB
db = CatDB("example.json")
db["test"] = "apple"
print(db["test"])
db.commit() # commit to save changes
```
## Features
### Autocommiting
```py
from catbase import CatDB
db = CatDB("example.json", autocommit=True)
db["test"] = "apple" # CatDB commits here automatically!
print(db["test"])
# no commit required!
```
### KeyError safety
```py
from catbase import CatDB
db = CatDB("example.json")
# oh no! "test" doesnt exist yet!
print(db["test"])
# output: None
```
### Custom KeyError defaults
```py
from catbase import CatDB
db = CatDB("example.json", none = 3)
# oh no! "test" doesnt exist yet again!
print(db["test"] + 1)
# output: 4
```
### Broken JSON safety
```py
from catbase import CatDB
db = CatDB("example.json", safe = False)
# now, if the example.json is corrupt, db will be empty instead of crashing.
# safe is set to True by default.
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.0 | Python |
نحوه نصب
نصب پکیج whl catbase-1.0.0:
pip install catbase-1.0.0.whl
نصب پکیج tar.gz catbase-1.0.0:
pip install catbase-1.0.0.tar.gz