convert json to relational db
Project description
Json2DB
Python3.6+
Just need defined a json object, then you can save it in to a relational DB like MySQL PostgreSQL or other DB.
Reason To Write This FrameWork
Example
from json2db import JFactory
d = {"aa": 1, "bb": 2, "brother": {"name": "jack", "namess": [{"other": "jack"}]}, 'sons': [{"son_name": "aa"}]}
factory = JFactory()
model = factory.from_json(data=d, root_name="data")
model.create_tables_in_db()
model.store(data=d)
model.search(search_args=[("aa", 1)], limit=2)
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
json2db-1.0.1.tar.gz
(9.1 kB
view details)
Built Distribution
File details
Details for the file json2db-1.0.1.tar.gz
.
File metadata
- Download URL: json2db-1.0.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
74adfe49ce3794a9656d5cc4a3ff6172f710a20cbd43ba14116e9eb249d9516f
|
|
MD5 |
a5da6a259e8f864a4c7f39205d4816d7
|
|
BLAKE2b-256 |
b500a48f848b024bdec9899d8c2b62dce7f6c671d8f2d226bd1aa4765d2192d2
|
File details
Details for the file json2db-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: json2db-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f566a1a251832a0f1a79ad46f746cd6fc16a9babcbd70658272dd9f30fb0dec0
|
|
MD5 |
d75d76074f27d28c1ce1269dbf996d0c
|
|
BLAKE2b-256 |
c7bb9f834d98a8dce04773e7b0f0c24a506bd10a27922b680912d57e37ea66b1
|