JSON 데이터 관리 라이브러리
Project description
Jsonly
누구나 데이터베이스 활용을
누구나 데이터베이스를 사용할 수 있어요!
여러가지 데이터베이스를 쉽게 활용할 수 있어요!
지원 파일 : .json / .db
자세한 사용법은 여기를 참조해주세요!
Installation
$ pip install jsonly
Example
DATA
# data.json (default)
{
"기본": {
"사과": "애플"
},
"하나": "일",
"둘": "이"
}
GET
데이터를 불러올 때 사용하는 메소드
# get.py
from jsonly.client import UseJsonly
jsonly = UseJsonly(path="data.json")
print(jsonly.get(path="기본/사과"))
# result
>>> 애플
SET
데이터를 덮어씌울 때 사용하는 메소드
# set.py
from jsonly.client import UseJsonly
jsonly = UseJsonly(path="data.json")
data = {"기본중에" : "기본"}
print(jsonly.set(data=data))
# result
>>> True
# data.json (modified from default)
{
"기본중에": "기본"
}
UPDATE
데이터를 루트 경로에 추가할 때 사용하는 메소드
# update.py
from jsonly.client import UseJsonly
jsonly = UseJsonly(path="data.json")
data = {"새로운" : "데이터"}
print(jsonly.update(data=data))
# result
>>> True
# data.json (modified from default)
{
"기본": {
"사과": "애플"
},
"하나": "일",
"둘": "이",
"새로운": "데이터"
}
INSERT
데이터를 특정 경로에 추가할 때 사용하는 메소드
# insert.py
from jsonly.client import UseJsonly
jsonly = UseJsonly(path="data.json")
data = {"데이터" : "삽입"}
print(jsonly.insert(data=data, path='기본'))
# result
>>> True
# data.json (modified from default)
{
"기본": {
"데이터": "삽입"
},
"하나": "일",
"둘": "이",
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonly-2.0.2.tar.gz
(5.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsonly-2.0.2.tar.gz.
File metadata
- Download URL: jsonly-2.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b511dcbc27ac0bf37ce4653a80997a92039b1feb46577c45aeadabb505451507
|
|
| MD5 |
bae2d2b45d9446b76454a1d5c693e724
|
|
| BLAKE2b-256 |
3cba1ca4dda8c66d6cf734504b525a1ee648b712d968b931108a718f8f6030e1
|
File details
Details for the file jsonly-2.0.2-py3-none-any.whl.
File metadata
- Download URL: jsonly-2.0.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d24bc7b74ce37b313bdfe4f1430ec7ad42e56d61024520c2aecdf5862118926
|
|
| MD5 |
b6d6813e356b04e0a49fba6e3349c15a
|
|
| BLAKE2b-256 |
409d0d8f692af29bf62e3b575abba445cb9f79d59835ead6f0f5fcc003edcb27
|