Datasette enrichment for evaluating templates in a Jinja sandbox
Project description
datasette-enrichments-jinja
Datasette enrichment for evaluating templates in a Jinja sandbox
Installation
Install this plugin in the same environment as Datasette.
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. 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:
cd datasette-enrichments-jinja
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datasette-enrichments-jinja-0.1a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 943e688a18242b500d841c60880ebbdca41e908f4c370acf612f581273202f63 |
|
MD5 | e69ceeba7e15a91da5d4e4a9700cb179 |
|
BLAKE2b-256 | a868c0257c82c5aa7bab2ef38bbd5d931bae31e88698daad29cf7fdeb744717b |
Hashes for datasette_enrichments_jinja-0.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cfd5a99e5889409dd50379355b6842c17e8ad3b8bc7a94936eb451778a3974b |
|
MD5 | 74a41d336f4c235be8ea5481df0f86c0 |
|
BLAKE2b-256 | b5a17efa069279262df6ad1a836b3bac50e3bbf27b064a8905c2d43c1be988bc |