Skip to main content

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


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.0.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

json2db-1.0.0-py2.py3-none-any.whl (9.5 kB view hashes)

Uploaded Python 2 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