django-encrypted-model-fields
A set of fields that wrap standard Django fields with encryption provided by the python cryptography library.
Decision gist · record as of 2026-08-14
No. While the package has no known vulnerabilities, it is abandoned with no maintenance for over four years. The risk of incompatibility with future Django or Python versions, combined with the certainty that security issues will not be patched, makes it unsuitable for new projects. Consider actively maintained alternatives or implement field-level encryption directly using cryptography.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires FIELD_ENCRYPTION_KEY to be set in Django settings; generate one with the manage.py generate_encryption_key command or manually via base64.urlsafe_b64encode(os.urandom(32)).
- Low install friction with only two runtime dependencies (cryptography and Django).
- However, the package is abandoned—last release was 1632 days ago with no recent maintenance activity.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no restrictions on use, modification, or distribution in commercial or private projects.
last release 2022-02-24 (1632 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 523,837 downloads/mo, #6,192 on PyPI
Alternatives
Verify before relying
pip install django-encrypted-model-fields
# In settings.py:
INSTALLED_APPS = [..., 'django-encrypted-model-fields']
FIELD_ENCRYPTION_KEY = os.environ.get('FIELD_ENCRYPTION_KEY')
# In models.py:
from django-encrypted-model-fields.fields import EncryptedCharField
class MyModel(models.Model):
secret = EncryptedCharField(max_length=100)- Compatibility with Django versions released after 4.0 (last tested version in classifiers).
- Whether the package works reliably with current cryptography library versions.
- Whether filtering and sorting limitations on encrypted fields are acceptable for your use case.
What it is and what it does
django-encrypted-model-fields provides Django ORM field types that automatically encrypt and decrypt data using cryptography. When you define a model field as an encrypted variant, data is encrypted before storage in the database and decrypted transparently when accessed in Python. The encryption key is read from Django settings (FIELD_ENCRYPTION_KEY) rather than from a file on disk, making it compatible with 12-factor app design and platforms like Heroku where environment variables are the standard way to manage secrets.
The package depends only on cryptography and Django, giving it low install friction. However, it has been abandoned for over four years with no active maintenance, meaning it may not work with the latest Django or Python releases, and any security issues discovered would not be patched.
Use it for
- Store sensitive user data in Django models with automatic encryption at the database layer.
- Meet compliance requirements that mandate encryption of personally identifiable information in databases.
- Deploy Django applications to Heroku or similar platforms where encryption keys come from environment variables.
- Protect against database breaches by ensuring encrypted fields remain unreadable if the database is compromised.
- Migrate from older encryption approaches to a Python 3-compatible solution without rewriting field definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
While the package has no known vulnerabilities, it is abandoned with no maintenance for over four years. The risk of incompatibility with future Django or Python versions, combined with the certainty that security issues will not be patched, makes it unsuitable for new projects. Consider actively maintained alternatives or implement field-level encryption directly using cryptography.
Install
django-encrypted-model-fields on PyPI
Before you install
Low install friction with only two runtime dependencies (cryptography and Django). However, the package is abandoned—last release was 1632 days ago with no recent maintenance activity. Use only if you can accept the risk of unpatched issues and incompatibility with future Django or Python versions.
Requires FIELD_ENCRYPTION_KEY to be set in Django settings; generate one with the manage.py generate_encryption_key command or manually via base64.urlsafe_b64encode(os.urandom(32)).
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install django-encrypted-model-fields
# In settings.py:
INSTALLED_APPS = [..., 'django-encrypted-model-fields']
FIELD_ENCRYPTION_KEY = os.environ.get('FIELD_ENCRYPTION_KEY')
# In models.py:
from django-encrypted-model-fields.fields import EncryptedCharField
class MyModel(models.Model):
secret = EncryptedCharField(max_length=100)
Verify before relying
- Compatibility with Django versions released after 4.0 (last tested version in classifiers).
- Whether the package works reliably with current cryptography library versions.
- Whether filtering and sorting limitations on encrypted fields are acceptable for your use case.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagescryptographyDjango |
| Maintenance | Abandoned 1,632 days since the last release |
| First released | |
| Downloads | 523,837 / month, #6,192 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.2Framework :: Django :: 3.0Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: SecurityTopic :: System :: Systems Administration :: Authentication/Directory |
Evidence: django_encrypted_model_fields-0.6.5-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 › “transparent field encryption”
- django-encrypted-model-fieldsWraps Django model fields with transparent encryption using the…
- pymongocryptPyMongoCrypt provides Python bindings for libmongocrypt, enabling…
- django-cryptography-5Provides encrypted model fields and cryptographic utilities for…
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-cryptography · django-cryptography-5 · django-cryptography-django5 · django-fernet-encrypted-fields · django-fernet-fields-v2 · dynamodb-encryption-sdk · djfernet · tenseal · sqlcipher3 · davey