{ "info": { "author": "Hong Minhee", "author_email": "hongminhee@member.fsf.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: Stackless", "Programming Language :: SQL", "Topic :: Database :: Front-Ends", "Topic :: Software Development" ], "description": "SQLAlchemy-Enum34\n=================\n\n.. image:: https://badge.fury.io/py/SQLAlchemy-Enum34.svg?\n :target: https://pypi.python.org/pypi/SQLAlchemy-Enum34\n.. image:: https://travis-ci.org/spoqa/sqlalchemy-enum34.svg?branch=master\n :target: https://travis-ci.org/spoqa/sqlalchemy-enum34\n.. image:: https://codecov.io/github/spoqa/sqlalchemy-enum34/coverage.svg?branch=master\n :target: https://codecov.io/github/spoqa/sqlalchemy-enum34?branch=master\n\nThis package provides a SQLAlchemy type to store values of standard\n``enum.Enum`` (which became a part of standard library since Python 3.4).\nIts internal representation is equivalent to SQLAlchemy's built-in\n``sqlalchemy.types.Enum``, but its Python representation is not\na ``str`` but ``enum.Enum``.\n\nNote that this works on Python 2.6 as well as 3.4, the latest version of\nPython, through enum34_ package.\n\nThe following example shows how enum_-typed columns can be declared::\n\n import enum\n\n from sqlalchemy import Column, Integer\n from sqlalchemy.ext.declarative import declarative_base\n from sqlalchemy_enum34 import EnumType\n\n Base = declarative_base()\n\n class Color(enum.Enum):\n black = 'black'\n white = 'white'\n navy = 'navy'\n red = 'red'\n\n class Size(enum.Enum):\n small = 'S'\n medium = 'M'\n large = 'L'\n xlarge = 'XL'\n\n class Shirt(Base):\n id = Column(Integer, primary_key=True)\n color = Column(EnumType(Color), nullable=False)\n size = Column(EnumType(Size, name='shirt_size'), nullable=False)\n\nAnd the following REPL session shows how these columns work:\n\n>>> shirt = session.query(Shirt).filter(Shift.color == Color.navy).first()\n>>> shirt.color\n\n>>> shirt.size\n\n\nWritten by `Hong Minhee`_ at Spoqa_, and distributed under MIT license.\n\n.. _enum34: https://pypi.python.org/pypi/enum34\n.. _enum: https://docs.python.org/3/library/enum.html\n.. _Hong Minhee: http://hongminhee.org/\n.. _Spoqa: http://www.spoqa.com/\n\n\nChangelog\n=========\n\n1.0.1\n-----\n\nReleased on August 7, 2015.\n\n- Fixed that ``sqlalchemy_enum34.Enum`` didn't allow nullability.\n [`#1`_ by Andr\u00e9s Moya]\n\n.. _#1: https://github.com/spoqa/sqlalchemy-enum34/pull/1\n\n\n1.0.0\n-----\n\nFirst version. Released on July 30, 2015.", "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/spoqa/sqlalchemy-enum34", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "SQLAlchemy-Enum34", "package_url": "https://pypi.org/project/SQLAlchemy-Enum34/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/SQLAlchemy-Enum34/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/spoqa/sqlalchemy-enum34" }, "release_url": "https://pypi.org/project/SQLAlchemy-Enum34/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "SQLAlchemy type to store standard enum.Enum value", "version": "1.0.1" }, "last_serial": 1667701, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e0ae3c9f0efc0588643191cdc36b8aeb", "sha256": "ac20252a4771f34032f6fa03d11cccf6f809bb9aa1a992750b80d866be1f1b11" }, "downloads": -1, "filename": "SQLAlchemy_Enum34-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "e0ae3c9f0efc0588643191cdc36b8aeb", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 5067, "upload_time": "2015-07-30T15:32:41", "url": "https://files.pythonhosted.org/packages/85/16/91e08cd6e9bdf4be27694592bf628909360af954dedf0fa5ffb81b886c9c/SQLAlchemy_Enum34-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c17de83d2a018374f4330dd93c160037", "sha256": "3a75ebf67c797290743c033569c5dd2d5c246b6139ab9cd3477121624cb50439" }, "downloads": -1, "filename": "SQLAlchemy-Enum34-1.0.0.tar.gz", "has_sig": true, "md5_digest": "c17de83d2a018374f4330dd93c160037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3375, "upload_time": "2015-07-30T15:32:35", "url": "https://files.pythonhosted.org/packages/6b/e9/28807f8420c0ee01b4e3a127abb30df3d3b70d53251bfb978d8608208ffa/SQLAlchemy-Enum34-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a8bc23b1e63cb558d0add56a4ee7fc87", "sha256": "c23fc4a71947b923192a8ab2fc3fe11d031a31ce32c2fda5e2fd67077d667263" }, "downloads": -1, "filename": "SQLAlchemy_Enum34-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "a8bc23b1e63cb558d0add56a4ee7fc87", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5400, "upload_time": "2015-08-07T02:03:18", "url": "https://files.pythonhosted.org/packages/6c/ec/0d46f5bea8d0998ecdccd07fc935037c7e207df73712bf27a7d973d26cce/SQLAlchemy_Enum34-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2c83ae4daf8ae32023c39f6cbe7d767", "sha256": "f74e77cfd059a3fa5c5adf1fb701aa090458d1d8b076ee604a1b1e5ecc7a6fb3" }, "downloads": -1, "filename": "SQLAlchemy-Enum34-1.0.1.tar.gz", "has_sig": true, "md5_digest": "b2c83ae4daf8ae32023c39f6cbe7d767", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3598, "upload_time": "2015-08-07T02:03:14", "url": "https://files.pythonhosted.org/packages/51/8a/86c4e5107d108a6a81a3344546f9f6563127245cdd23e834cb7ae31fc38e/SQLAlchemy-Enum34-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8bc23b1e63cb558d0add56a4ee7fc87", "sha256": "c23fc4a71947b923192a8ab2fc3fe11d031a31ce32c2fda5e2fd67077d667263" }, "downloads": -1, "filename": "SQLAlchemy_Enum34-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "a8bc23b1e63cb558d0add56a4ee7fc87", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5400, "upload_time": "2015-08-07T02:03:18", "url": "https://files.pythonhosted.org/packages/6c/ec/0d46f5bea8d0998ecdccd07fc935037c7e207df73712bf27a7d973d26cce/SQLAlchemy_Enum34-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2c83ae4daf8ae32023c39f6cbe7d767", "sha256": "f74e77cfd059a3fa5c5adf1fb701aa090458d1d8b076ee604a1b1e5ecc7a6fb3" }, "downloads": -1, "filename": "SQLAlchemy-Enum34-1.0.1.tar.gz", "has_sig": true, "md5_digest": "b2c83ae4daf8ae32023c39f6cbe7d767", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3598, "upload_time": "2015-08-07T02:03:14", "url": "https://files.pythonhosted.org/packages/51/8a/86c4e5107d108a6a81a3344546f9f6563127245cdd23e834cb7ae31fc38e/SQLAlchemy-Enum34-1.0.1.tar.gz" } ] }