{ "info": { "author": "Mr. Senko", "author_email": "atodorov@mrsenko.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Jinja2 A/B testing extension\n----------------------------\n\n.. image:: https://img.shields.io/travis/MrSenko/jinja-ab/master.svg\n :target: https://travis-ci.org/MrSenko/jinja-ab\n :alt: Build status\n\n\nThis is an A/B testing extension for Jinja. It allows you to encode\nexperiments in your templates and renders the experiment selected by\nthe ``AB_EXPERIMENT`` environment variable. 'control' is the default\nexperiment name if ``AB_EXPERIMENT`` is not specified!\n\nTo install::\n\n pip install jinja-ab\n\n\nEnable the extension in your code like this::\n\n import os\n import jinja_ab\n \n env = Environment(\n loader=FilesystemLoader(),\n extensions=[jinja_ab.JinjaAbExperimentExtension],\n )\n \n os.environ['AB_EXPERIMENT'] = 'v1'\n template = env.get_template('index.html')\n return template.render(context)\n\nThe template syntax is::\n\n {% experiment control %}This is the control{% endexperiment %}\n {% experiment v1 %}This is version 1{% endexperiment %}\n\nAlternative syntax is also supported::\n\n {% ab control %}This is the control{% endab %}\n {% ab v1 %}This is version 1{% endab %}\n\nYou can also mix the two tags in a single template::\n\n {% experiment control %}This is the control{% endexperiment %}\n {% ab v1 %}This is version 1{% endab %}\n\nSingle and double quoted names are also supported!\n\n**NOTE:** this extension deals with rendering the template string based\non the value of ``AB_EXPERIMENT``. It is up to you or your Jinja2 based tools\nto decide what to do with the result. At `Mr. Senko `_\nwe use this extension as part of the\n`pelican-ab `_ plugin.\n\nContributing\n============\n\nSource code and issue tracker are at https://github.com/MrSenko/jinja-ab\n\nCommercial support\n==================\n\n`Mr. Senko `_ provides commercial support for open source\nlibraries, should you need it!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MrSenko/jinja-ab", "keywords": "A/B testing,Jinja2", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "jinja-ab", "package_url": "https://pypi.org/project/jinja-ab/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jinja-ab/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/MrSenko/jinja-ab" }, "release_url": "https://pypi.org/project/jinja-ab/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Support A/B testing for Jinja2 templates", "version": "0.3.0" }, "last_serial": 2111239, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "f05a8c7bd1bbfdba3c15b35e52087663", "sha256": "9fbf2718426b643a9bcbadd692706866ddc434ad7d80f2f8c8bb83713bc4e2e3" }, "downloads": -1, "filename": "jinja-ab-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f05a8c7bd1bbfdba3c15b35e52087663", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2843, "upload_time": "2016-05-10T10:57:55", "url": "https://files.pythonhosted.org/packages/61/3f/825dc5cc0500483e3bcb69c535d7e63bd92bf2cbaf681471c06e1db32abe/jinja-ab-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "37c5b22089c5533d1f979d128d58a8e5", "sha256": "cd8d8c2c6cbaccd79b8dcd02a0d11496edb9d039a156ba69f5d6609e10c60a87" }, "downloads": -1, "filename": "jinja-ab-0.3.0.tar.gz", "has_sig": false, "md5_digest": "37c5b22089c5533d1f979d128d58a8e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3402, "upload_time": "2016-05-11T19:03:55", "url": "https://files.pythonhosted.org/packages/cf/87/495edffe9291fab29b53aab0c5540ce0ff3dda744f9f73e6c53e2d6cde7f/jinja-ab-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37c5b22089c5533d1f979d128d58a8e5", "sha256": "cd8d8c2c6cbaccd79b8dcd02a0d11496edb9d039a156ba69f5d6609e10c60a87" }, "downloads": -1, "filename": "jinja-ab-0.3.0.tar.gz", "has_sig": false, "md5_digest": "37c5b22089c5533d1f979d128d58a8e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3402, "upload_time": "2016-05-11T19:03:55", "url": "https://files.pythonhosted.org/packages/cf/87/495edffe9291fab29b53aab0c5540ce0ff3dda744f9f73e6c53e2d6cde7f/jinja-ab-0.3.0.tar.gz" } ] }