django-enumfields
Real Python Enums for Django.
Decision gist · record as of 2026-08-14
No—unless you are locked into Django 2.2, 3.0, or 3.1 with Python 3.5–3.9 and have no plans to upgrade. The package is abandoned and has not been updated since 2021. Compatibility with newer versions is unverified. For new projects, consider using Django's native choices with enums or a maintained alternative.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django 2.2, 3.0, or 3.1 and Python 3.5–3.9; compatibility with newer versions is unverified due to abandonment.
- Low install friction with no runtime dependencies.
- However, the package is abandoned—last release was 2021-02-23 and last commit 2022-12-20, with no active maintenance.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
last release 2021-02-23 (1998 days) · last repo commit 2022-12-20 · 146 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 132,797 downloads/mo, #11,536 on PyPI
Alternatives
Verify before relying
pip install django-enumfields
from enumfields import EnumField
from enum import Enum
class Color(Enum):
RED = 'r'
GREEN = 'g'
class MyModel(models.Model):
color = EnumField(Color, max_length=1)
m = MyModel.objects.filter(color=Color.RED)- Whether the package works with Django versions released after 3.1
- Whether the package works with Python versions released after 3.9
- Current state of DRF integration with modern rest_framework versions
- Whether abandonment has led to incompatibilities with current dependency versions
What it is and what it does
django-enumfields bridges Python's standard enum module (PEP 435) with Django's ORM by providing EnumField and EnumIntegerField model fields that store enum values in the database while preserving type safety in Python code. It includes a custom Enum class that auto-generates human-readable labels for use in admin dropdowns and forms, plus integration with Django's admin list filters and Django REST Framework serializers.
The package is straightforward to use: define a Python enum, attach it to a model field, and query using enum members directly rather than raw strings or integers. It handles form field generation and admin integration automatically. However, the project is no longer maintained—the last release was in February 2021 and the last repository commit in December 2022—so it may not work reliably with newer Django or Python versions.
Use it for
- Store categorical data (e.g., status, color, priority) in Django models with type-safe enum access instead of magic strings.
- Generate admin dropdown filters automatically from enum definitions without manual choice tuples.
- Serialize enum fields in Django REST Framework APIs while preserving enum semantics in the JSON output.
- Use enums in model queries and filters with IDE autocomplete and static type checking.
- Define custom labels for enum values in admin and form displays via a nested Labels class.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No—unless you are locked into Django 2.2, 3.0, or 3.1 with Python 3.5–3.9 and have no plans to upgrade.
The package is abandoned and has not been updated since 2021. Compatibility with newer versions is unverified. For new projects, consider using Django's native choices with enums or a maintained alternative.
Install
django-enumfields on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2021-02-23 and last commit 2022-12-20, with no active maintenance. Use only if your Django and Python versions align with the supported range.
Requires Django 2.2, 3.0, or 3.1 and Python 3.5–3.9; compatibility with newer versions is unverified due to abandonment.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install django-enumfields
from enumfields import EnumField
from enum import Enum
class Color(Enum):
RED = 'r'
GREEN = 'g'
class MyModel(models.Model):
color = EnumField(Color, max_length=1)
m = MyModel.objects.filter(color=Color.RED)
Verify before relying
- Whether the package works with Django versions released after 3.1
- Whether the package works with Python versions released after 3.9
- Current state of DRF integration with modern rest_framework versions
- Whether abandonment has led to incompatibilities with current dependency versions
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,998 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 132,797 / month, #11,536 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.0Framework :: Django :: 3.1Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP |
Evidence: django_enumfields-2.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python enum django model”
- django-enumfieldsProvides Django model fields that store Python enums natively,…
- django-choices-fieldProvides Django model fields that store and retrieve Django's…
- django-enumProvides a Django model field type that stores Python enumerations…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also django-bitfield · django-colorfield · django-enum · django-extended-choices · django-choices-field · marshmallow-enum · matrix-enum · jsonfield · django-pydantic-field · django-private-storage