{ "info": { "author": "Dan Langer", "author_email": "opensource@waveapps.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "django-sixpack\n==============\n\n\n``django-sixpack`` is a Django-friendly wrapper for the `sixpack-py `_ \nclient library to `SeatGeek `_'s `Sixpack `_,\na language-agnostic A/B testing framework.\n\nThis is not a full-fledged client (it relies on ``sixpack-py`` for the actual connection); it's a wrapper\nto make using ``sixpack-py`` more friendly and declarative.\n\n\nInstall\n-------\n\n.. code:: bash\n\n pip install django-sixpack\n\nConfiguration\n-------------\n\nSet ``SIXPACK_HOST`` and (optionally) ``SIXPACK_TIMEOUT`` in your settings file. \n\nIf ``SIXPACK_HOST`` is unset, it will fall back to ``sixpack-py``'s default, which is ``http://localhost:5000``. If ``SIXPACK_HOST`` is set to ``None``, ``django-sixpack`` will\noperate in test mode, which means that the control alternative (the first one listed) will be\nreturned for all ``participate`` calls, all ``convert`` calls will be successful, and the exertnal\nsixpack server will not be contacted.\n\nUsage\n-----\n\nFirst, define a test somewhere:\n\n.. code:: python\n \n from djsixpack.djsixpack import SixpackTest\n \n class ButtonColorTest(SixpackTest):\n alternatives = (\n 'RED',\n 'BLUE'\n )\n \nIf you go into the Sixpack web dashboard, you'll see this as a test called ``button_color``, with \nthe control being the alternative ``RED`` (the first alternative listed will be considered the control).\n\nWhen it's time to add a user to the test:\n\n.. code:: python\n \n expt = ButtonColorTest(request.user)\n bucket = expt.participate()\n \n context = {}\n if bucket == ButtonColorTest.RED:\n context = {'color': '#FF0000'}\n elif bucket == ButtonColorTest.BLUE:\n context = {'color': '#0000FF'}\n \n``SixpackTest.participate`` will return the alternative ``request.user`` is bucketed into - and all alternatives\nwill be available as class properties. \n\nWhen instantiating a ``SixpackTest`` test, the only argument the constructor takes is the model instance\nwhich is used to represent the person seeing this test. By default, ``SixpackTest`` will use the instance's\n``pk`` attribute as the unique identifier to represent this person - but this can be overridden by setting the\n``unique_attr`` class attribute.\n\nFor example, you could have a ``Business`` model class which represents a person, and it has a attribute called \n``global_id`` which represents a cross-platform way of identifying a particular ``Business``. In that case, \nyou could do:\n\n.. code:: python\n \n from djsixpack.djsixpack import SixpackTest\n \n class ButtonColorTest(SixpackTest):\n unique_attr = 'global_id'\n alternatives = (\n 'RED',\n 'BLUE'\n )\n\nAt any point, you can check the ``SixpackTest.client_id`` property to see what's being used as the ``client_id``.\n\nIf something ever goes wrong - a request times out, the ``sixpack`` server disappears, etc. - all ``participate`` \ncalls will return the control alternative, and all ``convert`` calls will seem successful (and we'll note this happend\nin the log).\n\nSuported Versions\n-----------------\n\n``django-sixpack`` will work with all version of Django >= 1.4, however the test suite requires Django >= 1.6.\n\nLicense\n-------\n\n``django-sixpack`` is released under the MIT license.\n\n\nContribute\n----------\n\n- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug\n- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it)\n- Send a pull request and bug the maintainer until it gets merged and published\n- Add yourself to the ``AUTHORS`` file\n\n\nThanks\n------\n\n- `SeatGeek `_, for being great", "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/waveaccounting/django-sixpack", "keywords": null, "license": "LICENSE", "maintainer": null, "maintainer_email": null, "name": "django-sixpack", "package_url": "https://pypi.org/project/django-sixpack/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-sixpack/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/waveaccounting/django-sixpack" }, "release_url": "https://pypi.org/project/django-sixpack/1.0.5/", "requires_dist": null, "requires_python": null, "summary": "A django-friendly wrapper for sixpack-py", "version": "1.0.5" }, "last_serial": 1348570, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "5e90a60366a6ce0d8f6081b2a51fcf23", "sha256": "c06f89021fba2b238ddb1087fb7c0f71681e9bbb467556d31e9b24c7d0f71ef6" }, "downloads": -1, "filename": "django_sixpack-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e90a60366a6ce0d8f6081b2a51fcf23", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8310, "upload_time": "2014-03-07T19:27:02", "url": "https://files.pythonhosted.org/packages/64/d3/359a3891ccb7f02ffb1c73af9eeec5630a4420d23e9da727424a93e96323/django_sixpack-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8990920024fd885836b60a7f258b3594", "sha256": "ba2a0e824fbed5b6f9f3e09f55e1f495e02e5c89d9c52ad517dc746559b0ddbc" }, "downloads": -1, "filename": "django-sixpack-1.0.3.tar.gz", "has_sig": false, "md5_digest": "8990920024fd885836b60a7f258b3594", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5784, "upload_time": "2014-03-07T19:26:54", "url": "https://files.pythonhosted.org/packages/9e/45/ba487018013cc3c193497cf2daf80fde4faf2d523e2072cf2f096573cdda/django-sixpack-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "3f4a828243c8399d3b3fa55ce598a3ce", "sha256": "0c1b7d59faffffa63fd0ae1d8dc788c12239b024b310ea68fc4d29fb7d6f524c" }, "downloads": -1, "filename": "django_sixpack-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f4a828243c8399d3b3fa55ce598a3ce", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8375, "upload_time": "2014-03-26T15:13:09", "url": "https://files.pythonhosted.org/packages/94/c7/8923aa5fcebbfe002c6a7e2507fc43cce4336fec7ae7746a864b0e1fad07/django_sixpack-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "211ab86ccfc117c74ba6776f77cc92c0", "sha256": "a80419654ae902733da52e93e115c903769a6b15a5e4fbfede6525356a19fa64" }, "downloads": -1, "filename": "django-sixpack-1.0.4.tar.gz", "has_sig": false, "md5_digest": "211ab86ccfc117c74ba6776f77cc92c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5822, "upload_time": "2014-03-26T15:12:40", "url": "https://files.pythonhosted.org/packages/71/28/1b033414bb013406b68210fee7490f93de0f33bcf172d98677fad43a3231/django-sixpack-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "5e269d58e3c00a9f24b58921cb0d8e34", "sha256": "a5282b864dea5c742ff932960f3df835a2d39ab1757cb45029db3f54315e72d5" }, "downloads": -1, "filename": "django-sixpack-1.0.5.tar.gz", "has_sig": false, "md5_digest": "5e269d58e3c00a9f24b58921cb0d8e34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5960, "upload_time": "2014-12-18T00:05:51", "url": "https://files.pythonhosted.org/packages/21/a0/0d8b0d87429df9949689d7329e88b08d690f405bf61c703565b4a8fe14ad/django-sixpack-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5e269d58e3c00a9f24b58921cb0d8e34", "sha256": "a5282b864dea5c742ff932960f3df835a2d39ab1757cb45029db3f54315e72d5" }, "downloads": -1, "filename": "django-sixpack-1.0.5.tar.gz", "has_sig": false, "md5_digest": "5e269d58e3c00a9f24b58921cb0d8e34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5960, "upload_time": "2014-12-18T00:05:51", "url": "https://files.pythonhosted.org/packages/21/a0/0d8b0d87429df9949689d7329e88b08d690f405bf61c703565b4a8fe14ad/django-sixpack-1.0.5.tar.gz" } ] }