Creating new Queries#

New queries should follow the below template with your desired path in the place of URL_PATH

from .__init__ import app
from .__init__ import sqlQuery

@app.route("/URL_PATH/<x>")
    def api_return_table(x):
    return sqlQuery(f"SELECT * FROM {x}")

URL paths can be passed down by being placed within “<>” as described here

URL arguments can be accessed as described here

the sqlQuery method can then be used to send a query directly to the DB.