bhavaniravi / python-query-generator

A JSON Schema that can be constructed into Postgres, Mongo, Bigquery Queries
Apache License 2.0
1 stars 0 forks source link

Python Query Generator

This project is built to have a centralized JSON schema for filter configuration on the front-end that can be directly serialized into a query on the backend.

This project is a work in progress and is not yet ready for production use.

Todo

Tech Debt

Installation

poetry shell
poetry install

Usage

On a Python script type the following


from query_generator import QueryGenerator

query = {
    "filters": [
        {
            "field": "name",
            "operation": "eq",
            "value": "John Doe"
        }
    ]
}

query_generator = QueryGenerator()
query_generator.generate_query(query)