Skip to main content

Support A/B testing for Jinja2 templates

Project description

Build status

This is an A/B testing extension for Jinja. It allows you to encode experiments in your templates and renders the experiment selected by the AB_EXPERIMENT environment variable. ‘control’ is the default experiment name if AB_EXPERIMENT is not specified! The syntax is:

{% experiment control %}This is the control{% endexperiment %}
{% experiment v1 %}This is version 1{% endexperiment %}

Single and double quoted names are also supported.

NOTE: this extension deals with rendering the template string based on the value of AB_EXPERIMENT. It is up to you or your Jinja2 based tools to decide what to do with the result.

Contributing

Source code and issue tracker are at https://github.com/MrSenko/jinja-ab

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

jinja-ab-0.2.1.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file jinja-ab-0.2.1.tar.gz.

File metadata

  • Download URL: jinja-ab-0.2.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jinja-ab-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9fbf2718426b643a9bcbadd692706866ddc434ad7d80f2f8c8bb83713bc4e2e3
MD5 f05a8c7bd1bbfdba3c15b35e52087663
BLAKE2b-256 613f825dc5cc0500483e3bcb69c535d7e63bd92bf2cbaf681471c06e1db32abe

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