{ "info": { "author": "Olist Developers", "author_email": "developers@olist.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "easy-choices\n=============\n\n.. image:: https://circleci.com/gh/olist/easy-choices.svg?style=shield\n :target: https://circleci.com/gh/olist/easy-choices\n\n\nIt's a library deeply inspired by Choices from `django-model-utils`_.\nHowever, sometimes we just need to use Choices rather than all the features provided by `django-model-utils`_.\n\n.. _django-model-utils: https://django-model-utils.readthedocs.io/\n\n\nRequirements\n------------\n\n* Python >= 3.5\n\n\nUsage\n-----\n\nThe ``easy-choices`` package is hosted on our `PyPI repository`_.\n\n.. _PyPI repository: https://pypi.org/user/olist/\n\nYou can install the latest version of ``easy-choices`` using pip:\n\n.. code-block:: bash\n\n $ pip install easy-choices\n\n\nAnd use easy-choices as it's demonstrated below:\n\n\n.. code-block:: python\n\n from django.db import models\n from easy_choices import Choices\n\n status_choices = Choices(\n (\"sent\", \"Sent\"),\n (\"delivered\", \"Delivered\"),\n )\n\n class Product(models.Model)\n price = models.DecimalField(max_digits=10, decimal_places=2)\n status = models.CharField(max_length=10, choices=status_choices.to_django_choices())\n\n @property\n def is_delivered(self):\n # You can use status_choices as a Enum\n return self.status == status_choices.delivered\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/olist/easy-choices", "keywords": "", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "easy-choices", "package_url": "https://pypi.org/project/easy-choices/", "platform": "", "project_url": "https://pypi.org/project/easy-choices/", "project_urls": { "Homepage": "https://github.com/olist/easy-choices" }, "release_url": "https://pypi.org/project/easy-choices/1.0.0/", "requires_dist": [ "black ; extra == 'dev'", "isort ; extra == 'dev'", "pre-commit ; extra == 'dev'", "pytest ; extra == 'dev'", "pytest-cov ; extra == 'dev'", "tox ; extra == 'dev'" ], "requires_python": "", "summary": "Handle choices field easily", "version": "1.0.0" }, "last_serial": 5524944, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ecf17fe4da08ab6746bd91b8348f4c94", "sha256": "0a4874719ad57b0f6762224413a873100434c31fc43f9759738c3a8b440a27ba" }, "downloads": -1, "filename": "easy_choices-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ecf17fe4da08ab6746bd91b8348f4c94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7063, "upload_time": "2019-07-12T20:53:18", "url": "https://files.pythonhosted.org/packages/90/e9/211f2ac5ed3a2789aac7e5a197e77423e54f1cef3470747908e4e429d551/easy_choices-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae867bac4d658a71fc0c46295b0a0189", "sha256": "37c3fe5328f73c20cf7fad8c6e258c8aea513b756c8048949cffc63197d03d03" }, "downloads": -1, "filename": "easy-choices-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ae867bac4d658a71fc0c46295b0a0189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7482, "upload_time": "2019-07-12T20:53:21", "url": "https://files.pythonhosted.org/packages/c5/c6/ec233c899ecaee2c06d0bc8acb5f3d4321f9a59ced26e93021351a926cbb/easy-choices-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ecf17fe4da08ab6746bd91b8348f4c94", "sha256": "0a4874719ad57b0f6762224413a873100434c31fc43f9759738c3a8b440a27ba" }, "downloads": -1, "filename": "easy_choices-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ecf17fe4da08ab6746bd91b8348f4c94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7063, "upload_time": "2019-07-12T20:53:18", "url": "https://files.pythonhosted.org/packages/90/e9/211f2ac5ed3a2789aac7e5a197e77423e54f1cef3470747908e4e429d551/easy_choices-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae867bac4d658a71fc0c46295b0a0189", "sha256": "37c3fe5328f73c20cf7fad8c6e258c8aea513b756c8048949cffc63197d03d03" }, "downloads": -1, "filename": "easy-choices-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ae867bac4d658a71fc0c46295b0a0189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7482, "upload_time": "2019-07-12T20:53:21", "url": "https://files.pythonhosted.org/packages/c5/c6/ec233c899ecaee2c06d0bc8acb5f3d4321f9a59ced26e93021351a926cbb/easy-choices-1.0.0.tar.gz" } ] }