Skip to main content

JSON 데이터 관리 라이브러리

Project description

Jsonly

banner

누구나 데이터베이스 활용을


누구나 데이터베이스를 사용할 수 있어요!

여러가지 데이터베이스를 쉽게 활용할 수 있어요!
지원 파일 : .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 hashes)

Uploaded Source

Built Distribution

jsonly-2.0.2-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page