{"repo":"django-commons/django-enum","free":true,"listed":false,"github":"https://github.com/django-commons/django-enum","clone":"git clone https://github.com/django-commons/django-enum.git","description":"Full and natural support for enumerations as Django model fields.","language":"Python","stars":110,"topics":["bitfield","bitfields","bitmask","database","databases","defines","django","enum","enumeration","enums"],"license":"MIT","category":"databases-storage","readme_excerpt":"django-enum --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- 🚨 See migration guide for notes on 1.x to 2.x migration. 🚨 Full and natural support for PEP435 enumerations as Django model fields. Many packages aim to ease usage of Python enumerations as model fields. Most were superseded when Django provided TextChoices and IntegerChoices types. The motivation for django-enum was to: Work with any Enum including those that do not derive from Django's TextChoices and IntegerChoices. Coerce fields to instances of the Enum type by default. Allow strict adherence to Enum values to be disabled. Handle migrations appropriately. (See migrations) Integrate as fully as possible with Django's existing level of enum support. Support enum-properties to enable richer enumeration types. (A less awkward alternative to dataclass enumerations with more features) Represent enum fields with the smallest possible column type. Support bit field queries using standard Python Flag enumerations. Be as simple and light-weight an extension to core Django as possible. Enforce enumeration value consistency at the database level using check constraints by default. (TODO) Support native database enumeration column types when available. django-enum provides a new model field type, EnumField, that allows you to treat almost any PEP435 enumeration as a database","default_branch":null,"files":null,"tree":[],"storefront":"/r/django-commons","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/django-commons/django-enum/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}