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.1a1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for datasette-enrichments-jinja-0.1a1.tar.gz
Algorithm Hash digest
SHA256 9a13ea6b2a047e6573666eaf16821b8b086d0e7531b74c770ba27f38cb121bda
MD5 9525fef52f7a9f35ce7514ad54c90410
BLAKE2b-256 96ed1943dfb0a556b84ba3b209685db0d67ca633583d5ca651124809499ef63a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datasette_enrichments_jinja-0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8406b659d232618834b9e49d7de080320654c898d3996d3d7cce094c5b26c75
MD5 f29f0c3abb802432045eb6dba503ecb9
BLAKE2b-256 646c7b42361e97d870f48af8316c24fa7be529944b5738cc2b3b0113db76c37d

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