Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Latest commit

 

History

History
70 lines (40 loc) · 1.88 KB

File metadata and controls

70 lines (40 loc) · 1.88 KB

json2sql

A lightweight Python3 library for describing SQL statements using JSON

codecov PyPI Current Version PyPI Implementation PyPI Wheel Travis CI GitHub stars GitHub license Twitter

Is this project helpful? Send me a simple warm message!

Crossroad

Documentation

API design

  • input - text file, string, dict
  • kwargs

json2sql.json2sql()

TBD

json2sql.delete2sql()

TBD

json2sql.insert2sql()

TBD

json2sql.replace2sql()

TBD

json2sql.select2sql()

TBD

json2sql.update2sql()

TBD

Installation

There is required Python3 in version 3.4 or later:

$ pip3 install json2sql

Why was this library created?

The code was originally placed in fabric8-analytics project for instrumentation of jobs based on API requests or periodic jobs written in YAML/JSON config files. Code was extracted to provide basic JSON/YAML/dict to SQL conversion.

Under the hood

This project uses mosql under the hood for creating SQL statements. However it was not possible to use mosql to create more sophisticated queries (such as joins described by jobs or nested select queries). Check out mosql page for more details.