Skip to content

querytechnology/tqc-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tqc-py

Command line interface written in Python for the TinyQueries™ Compiler

Installation

  • Make sure you have an API key for the TinyQueries™ Compiler - you can get one here: https://tinyqueries.com/signup.
  • Add the API key as TINYQUERIES_API_KEY to your ENV variables.
  • Make sure you have Python and pip installed
  • run pip install tqc

Setup TinyQueries™ for your project

It is assumed you have a folder for your project. It can be an empty folder or a folder which contains other code as well.

  • Create a folder inside your project folder (for example tinyqueries) in which you put your TinyQueries source queries
  • Create a folder inside your project folder (for example sql) in which you want the compiler to put your compiled queries
  • Create a config file tinyqueries.json or tinyqueries.yaml in the root of your project folder. For example:
project:
  label: my-project-label
compiler:
  dialect: mysql
  input: ./tinyqueries
  output: ./sql

For a more detailed description of config files please check https://compile.tinyqueries.com

Compile your queries

Once you have setup your project you just have to execute

tqc

from your project folder each time you want to compile your source files

About

Command line interface for the TinyQueries™ Compiler (Python version)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published