Skip to main content

JSON to SQL query generator

Project description

jsqlib

JSON to SQL query generator.

pipeline status PyPI version

Builds SQL queries from pre-designed JSON structures.

Installation

OS X & Linux & Windows:

pip install jsqlib

Usage example

from jsqlib import Query

json = """{
  "query": {
    "select": [
      {
        "eval": 1
      }
    ]
  }
}
"""

sql = Query(json).sql
assert sql == 'select 1'

Development setup

  • coverage
$ pytest --cov
  • format
$ black jsqlib -S
  • lint
$ flakehell lint

Release History

  • 0.3a0
    • delete using, not like constructs
  • 0.2a0
    • dialect based stringification
  • 0.1a0
    • initial alpha-release
  • 0.0.1
    • wip

Meta

pymancer@gmail.com (polyanalitika.ru)
https://gitlab.com/ru-r5/jsqlib

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

Contributing

  1. Fork it (https://gitlab.com/ru-r5/jsqlib/fork)
  2. Create your feature branch (git checkout -b feature/foo)
  3. Commit your changes (git commit -am 'Add some foo')
  4. Push to the branch (git push origin feature/foo)
  5. Create a new Pull Request

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

jsqlib-0.3a0.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

jsqlib-0.3a0-py3-none-any.whl (10.8 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