A simple way to handle database in json.
Project description
Install
- Linux :
python3 -m pip install easydb-json
- Windows :
python -m pip install easydb-json
Author
Discord : Lactua#6319
Github: https://github.com/lactua
Documentation
-
Get started
To start, you have to create your database in your code by using the init function.
init (function)
The init function return you a dict that you can edit and that will be saved in the path that you gave.
Parameter Type Description path string The path of the database file Example :
from easydb-json import init mydb = init('NiceDir/NiceFile.json')
-
Interact with the database
When you edit the dict that is return from the init function, it automaticly edit the database file. So to interact with the database, interact with the dict.
Example :
from easydb-json import init mydb = init('NiceDir/NiceFile.json') mydb['name'] = 'Lactua' print(mydb['name']) mydb['name'] = 'Luctau' print(mydb['name']) del mydb['name']
Output :
Lactua Luctau
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easydb-json-1.0.0.tar.gz
(2.3 kB
view details)
Built Distribution
File details
Details for the file easydb-json-1.0.0.tar.gz
.
File metadata
- Download URL: easydb-json-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f049e54c216f7cc41918cb285d9c826b653bccde2271d50a2e58648036818d4 |
|
MD5 | c81f1c3666ced5b4e640028e58570f0f |
|
BLAKE2b-256 | ce18fa902f7828178a1f63d9f2e2f5329a9dd694180f7ec53b8350908f536b06 |
File details
Details for the file easydb_json-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: easydb_json-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7225d6c36be8ecf7fab1e3d5ec88993fc2a6b2b202d221b8068c0e4ba3746af6 |
|
MD5 | 3201712611afc5cc51a9430f3a1d638a |
|
BLAKE2b-256 | b7f284ed59cbeb3f77ee53d43408021ded54d279029b7af1ac2025cf7e0ac0d7 |