Welcome to the Python Query Builder library! This library is intended to make it easier to work with SQL queries based on a JSON file instead of a long string hard-coded inside of Python or a text file.
- Find the .whl file under Releases in GitHub and download the file.
- Run the following command:
pip install <filename>.whl
- At the top of your Python file, add the following import:
from querybuilder import QueryBuilder - Add your desired query in the JSON format provided to a JSON file of your choice.
- In your code, call the QueryBuilder using the following parameters:
query = QueryBuilder(file_path, query_name) - That is it! To get your query, call
query.get_query_string().
If you have any contributions or suggestions to the module, please don't hesitate to contribute! I made this to make my life easier for a project I was working on, and thought I would share. Any improvements are welcome!