Skip to main content

Datasette enrichment for evaluating templates in a Jinja sandbox

Project description

datasette-enrichments-jinja

PyPI Changelog Tests License

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-enrichments-jinja-0.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file datasette-enrichments-jinja-0.1.tar.gz.

File metadata

File hashes

Hashes for datasette-enrichments-jinja-0.1.tar.gz
Algorithm Hash digest
SHA256 f383d6d487615abf9ad84d27bae7ccdfb4a92d38f482a017790a9859cd02dd4b
MD5 f888cf2d62141295ac1b65029ddedea7
BLAKE2b-256 6a428b1cb747a2f97f6b1c98c7feb1fcc26f81b1577bc5f76bc7c88fd3d6a2a6

See more details on using hashes here.

File details

Details for the file datasette_enrichments_jinja-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_enrichments_jinja-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f424eb7c19bd7dfcbe11ec1d7c223123eb2bfbb5ba0a19db678fb2fce17f30a
MD5 4c83993da2737f296bf01e3a78009711
BLAKE2b-256 727f8f0755a646cb461e622b58a9bef3895be9fabe39df8d18a95745e5c4f5bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page