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

fridex/json2sql

Repository files navigation

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.

About

A lightweight Python3 library for describing SQL statements using JSON or Python dictionaries

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published