Jinjat
Develop data applications with dbt, SQL, and OpenAPI
Installation
pip install jinjat
Create your first API
Create an analysis in analysis/my_first_api.sql:
{%- set query = request().query %}
select '{{query.example}}' as col1
And create a YML file in analysis/schema.yml:
version: 2
analyses:
- name: my_first_api
config:
jinjat:
method: get
openapi:
parameters:
- in: query
name: example
schema:
type: number
Start Jinjat as follows:
jinjat serve --project-dir [YOUR_DBT_PROJECT_DIRECTORY]
And then run the following CURL command to test the API:
curl -XGET 'http://127.0.0.1:8581?example=value'
It should return the following response:
[
"col1": "3"
]
Jinjat uses OpenAPI to validate the requests and create an API documentation automatically for your API.
Integrations
poetry install --extras "duckdb"
Playground
poetry install --extras "playground"
Installation
pip install jinjat[playground]
Jinjat Playground is a Streamlit app that lets you develop APIs in your browser. Once you write the template, you can save it to your dbt project as an analysis and expose the API.
Release files for jinjat 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jinjat-0.6.tar.gz | 34.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jinjat-0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.7 kB
Release files / jinjat-0.6.tar.gz
| Download URL | jinjat-0.6.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53be0783c9a66f272e23f7eec95e662cbb3922d559b5678f4146264f936195b5
|
|
BLAKE2b-256 checksum How to use checksums |
56aff463249801a610dc534dace6cf1c5577cbfb6296ea3a4e43841173574c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / jinjat-0.6-py3-none-any.whl
| Download URL | jinjat-0.6-py3-none-any.whl |
|---|---|
| Size | 40.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b284684bc3279cf600501ffdf6f181b387db2da5fdde960519c18c8475cae06
|
|
BLAKE2b-256 checksum How to use checksums |
aa9d666aec7bc227045d517953931d901a291a397ba5111a7a0fcf4296fe3369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|