# Jinjat
## Develop data applications with dbt, SQL, and OpenAPI
### Installation
```commandline
pip install jinjat
```
### Create your first API
Create an [analysis]() in `analysis/my_first_api.sql`:
```sql
{%- set query = request().query %}
select '{{query.example}}' as col1
```
And create a YML file in `analysis/schema.yml`:
```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:
```commandline
jinjat serve --project-dir [YOUR_DBT_PROJECT_DIRECTORY]
```
And then run the following CURL command to test the API:
```commandline
curl -XGET 'http://127.0.0.1:8581?example=value'
```
It should return the following response:
```json
[
"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
```commandline
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/jinjat-data/jinjat",
"name": "jinjat",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.1,<4",
"maintainer_email": "",
"keywords": "dbt,server,streamlit,git,refine,data-app,snowflake",
"author": "buremba",
"author_email": "emrekabakci@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/56/af/f463249801a610dc534dace6cf1c5577cbfb6296ea3a4e43841173574c75/jinjat-0.6.tar.gz",
"platform": null,
"description": "# Jinjat\n\n## Develop data applications with dbt, SQL, and OpenAPI\n\n### Installation\n\n```commandline\npip install jinjat\n```\n\n### Create your first API\n\nCreate an [analysis]() in `analysis/my_first_api.sql`:\n```sql\n{%- set query = request().query %}\n\nselect '{{query.example}}' as col1\n```\n\nAnd create a YML file in `analysis/schema.yml`:\n\n```yml\nversion: 2\n\nanalyses:\n - name: my_first_api\n config:\n jinjat:\n method: get\n openapi:\n parameters:\n - in: query\n name: example\n schema:\n type: number\n```\n\nStart Jinjat as follows:\n\n```commandline\njinjat serve --project-dir [YOUR_DBT_PROJECT_DIRECTORY]\n```\n\nAnd then run the following CURL command to test the API:\n\n```commandline\ncurl -XGET 'http://127.0.0.1:8581?example=value'\n```\n\nIt should return the following response:\n\n```json\n[\n \"col1\": \"3\"\n]\n```\n\nJinjat uses OpenAPI to validate the requests and create an API documentation automatically for your API.\n\n## Integrations\n\npoetry install --extras \"duckdb\"\n\n### Playground\n\npoetry install --extras \"playground\"\n\n\n#### Installation\n\n```commandline\npip install jinjat[playground]\n```\n\nJinjat Playground is a Streamlit app that lets you develop APIs in your browser.\nOnce you write the template, you can save it to your dbt project as an analysis and expose the API.\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A low-code data application framework that uses dbt Core and OpenAPI",
"version": "0.6",
"project_urls": {
"Documentation": "https://github.com/jinjat-data/jinjat",
"Homepage": "https://github.com/jinjat-data/jinjat",
"Repository": "https://github.com/jinjat-data/jinjat"
},
"split_keywords": [
"dbt",
"server",
"streamlit",
"git",
"refine",
"data-app",
"snowflake"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa9d666aec7bc227045d517953931d901a291a397ba5111a7a0fcf4296fe3369",
"md5": "c78ca8d23a3281700b2ff22595fa8eb6",
"sha256": "7b284684bc3279cf600501ffdf6f181b387db2da5fdde960519c18c8475cae06"
},
"downloads": -1,
"filename": "jinjat-0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c78ca8d23a3281700b2ff22595fa8eb6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4",
"size": 40716,
"upload_time": "2023-05-16T23:48:27",
"upload_time_iso_8601": "2023-05-16T23:48:27.198474Z",
"url": "https://files.pythonhosted.org/packages/aa/9d/666aec7bc227045d517953931d901a291a397ba5111a7a0fcf4296fe3369/jinjat-0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "56aff463249801a610dc534dace6cf1c5577cbfb6296ea3a4e43841173574c75",
"md5": "bb1707976618c6be81cfd6a3cfd409ce",
"sha256": "53be0783c9a66f272e23f7eec95e662cbb3922d559b5678f4146264f936195b5"
},
"downloads": -1,
"filename": "jinjat-0.6.tar.gz",
"has_sig": false,
"md5_digest": "bb1707976618c6be81cfd6a3cfd409ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4",
"size": 34938,
"upload_time": "2023-05-16T23:48:29",
"upload_time_iso_8601": "2023-05-16T23:48:29.209724Z",
"url": "https://files.pythonhosted.org/packages/56/af/f463249801a610dc534dace6cf1c5577cbfb6296ea3a4e43841173574c75/jinjat-0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-16 23:48:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jinjat-data",
"github_project": "jinjat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jinjat"
}