Name | datasette-enrichments-jinja JSON |
Version |
0.1a1
JSON |
| download |
home_page | |
Summary | Datasette enrichment for evaluating templates in a Jinja sandbox |
upload_time | 2023-11-20 05:07:14 |
maintainer | |
docs_url | None |
author | Simon Willison |
requires_python | >=3.8 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# datasette-enrichments-jinja
[![PyPI](https://img.shields.io/pypi/v/datasette-enrichments-jinja.svg)](https://pypi.org/project/datasette-enrichments-jinja/)
[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-enrichments-jinja?include_prereleases&label=changelog)](https://github.com/datasette/datasette-enrichments-jinja/releases)
[![Tests](https://github.com/datasette/datasette-enrichments-jinja/workflows/Test/badge.svg)](https://github.com/datasette/datasette-enrichments-jinja/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-enrichments-jinja/blob/main/LICENSE)
[Datasette enrichment](https://github.com/simonw/datasette-enrichments) for evaluating templates in a Jinja sandbox
## Installation
Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-enrichments-jinja
```
## Usage
This enrichment allows you to select rows from a table and specify a Jinja template to use to generate new text for each of those rows.
The text can then be saved to a new or existing column on the table.
Code runs in a [Jinja sandbox](https://jinja.palletsprojects.com/en/3.1.x/sandbox/). This should protect against innocent mistakes, but may not be robust against malicious attackers - so only make this enrichment available to users who you trust not to abuse it.
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd datasette-enrichments-jinja
python3 -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
pytest
```
Raw data
{
"_id": null,
"home_page": "",
"name": "datasette-enrichments-jinja",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Simon Willison",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/96/ed/1943dfb0a556b84ba3b209685db0d67ca633583d5ca651124809499ef63a/datasette-enrichments-jinja-0.1a1.tar.gz",
"platform": null,
"description": "# datasette-enrichments-jinja\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-enrichments-jinja.svg)](https://pypi.org/project/datasette-enrichments-jinja/)\n[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-enrichments-jinja?include_prereleases&label=changelog)](https://github.com/datasette/datasette-enrichments-jinja/releases)\n[![Tests](https://github.com/datasette/datasette-enrichments-jinja/workflows/Test/badge.svg)](https://github.com/datasette/datasette-enrichments-jinja/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-enrichments-jinja/blob/main/LICENSE)\n\n[Datasette enrichment](https://github.com/simonw/datasette-enrichments) for evaluating templates in a Jinja sandbox\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n```bash\ndatasette install datasette-enrichments-jinja\n```\n## Usage\n\nThis enrichment allows you to select rows from a table and specify a Jinja template to use to generate new text for each of those rows.\n\nThe text can then be saved to a new or existing column on the table.\n\nCode runs in a [Jinja sandbox](https://jinja.palletsprojects.com/en/3.1.x/sandbox/). This should protect against innocent mistakes, but may not be robust against malicious attackers - so only make this enrichment available to users who you trust not to abuse it.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-enrichments-jinja\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Datasette enrichment for evaluating templates in a Jinja sandbox",
"version": "0.1a1",
"project_urls": {
"CI": "https://github.com/datasette/datasette-enrichments-jinja/actions",
"Changelog": "https://github.com/datasette/datasette-enrichments-jinja/releases",
"Homepage": "https://github.com/datasette/datasette-enrichments-jinja",
"Issues": "https://github.com/datasette/datasette-enrichments-jinja/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "646c7b42361e97d870f48af8316c24fa7be529944b5738cc2b3b0113db76c37d",
"md5": "f29f0c3abb802432045eb6dba503ecb9",
"sha256": "b8406b659d232618834b9e49d7de080320654c898d3996d3d7cce094c5b26c75"
},
"downloads": -1,
"filename": "datasette_enrichments_jinja-0.1a1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f29f0c3abb802432045eb6dba503ecb9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7763,
"upload_time": "2023-11-20T05:07:13",
"upload_time_iso_8601": "2023-11-20T05:07:13.235750Z",
"url": "https://files.pythonhosted.org/packages/64/6c/7b42361e97d870f48af8316c24fa7be529944b5738cc2b3b0113db76c37d/datasette_enrichments_jinja-0.1a1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "96ed1943dfb0a556b84ba3b209685db0d67ca633583d5ca651124809499ef63a",
"md5": "9525fef52f7a9f35ce7514ad54c90410",
"sha256": "9a13ea6b2a047e6573666eaf16821b8b086d0e7531b74c770ba27f38cb121bda"
},
"downloads": -1,
"filename": "datasette-enrichments-jinja-0.1a1.tar.gz",
"has_sig": false,
"md5_digest": "9525fef52f7a9f35ce7514ad54c90410",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7633,
"upload_time": "2023-11-20T05:07:14",
"upload_time_iso_8601": "2023-11-20T05:07:14.607968Z",
"url": "https://files.pythonhosted.org/packages/96/ed/1943dfb0a556b84ba3b209685db0d67ca633583d5ca651124809499ef63a/datasette-enrichments-jinja-0.1a1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-20 05:07:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "datasette",
"github_project": "datasette-enrichments-jinja",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "datasette-enrichments-jinja"
}