{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/8"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/17"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/6"},{"label":"Site Management","url":"https://skillfed.io/packages/category/internet-www-http-site-management"}],"enrichment":{"capability":"Provides a Django model field type that stores Python enumerations (Enum, IntEnum, Flag) as database columns, automatically coercing values to their enum type on retrieval.","skillfed_tags":["django-orm","enum-types","bitfield"],"use_cases":["Store status or state enums in models and access them as typed enum instances rather than raw strings or integers","Implement permission or feature flags using IntFlag with bitfield queries to efficiently check multiple permissions at once","Use complex enums with enum-properties to attach rich metadata (labels, RGB values, etc.) to each enum member and query by any symmetric property","Replace multiple boolean columns with a single Flag enum field to reduce storage and improve query performance on large tables","Ensure database-level consistency of enum values using check constraints while maintaining clean, type-safe Python code"],"what_it_does":"django-enum extends Django's model layer with an EnumField that treats Python enumerations as first-class database column types. Rather than storing only the raw value (string or integer) and requiring manual conversion, EnumField automatically coerces retrieved values back to their enum type, so you work with type-safe enum instances throughout your code. It handles standard enums (TextChoices, IntegerChoices), custom Enum types, and Flag types for bitfield operations.\n\nThe package intelligently selects the smallest appropriate database column type for each enum\u2014for example, an IntegerChoices with values 0\u201332767 becomes a PositiveSmallIntegerField. It integrates with Django's existing choice system, supports migrations, enforces value consistency via database check constraints, and optionally works with enum-properties for richer enumeration types with multiple symmetric properties. The library is lightweight, actively maintained, and supports modern Django (4.2\u20136.1) and Python (3.10\u20133.14) versions.","worth_installing":"Yes. django-enum is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem\u2014type-safe enum storage in Django models. Use it if you want enum instances (not raw values) in your ORM, need bitfield support, or work with complex enums. The 1.x to 2.x migration is documented; review the changelog if upgrading."},"id":"django-enum","links":{"html":"https://skillfed.io/packages/django-enum","md":"https://skillfed.io/packages/django-enum.md","pypi":"https://pypi.org/project/django-enum/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-31","license_spdx":"MIT","license_treatment":"permissive","name":"django-enum","python_support":"supports_current","summary":"Full and natural support for enumerations as Django model fields."},"popularity":{"monthly_downloads":172356,"position":10339,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.5.0"}
