django-fernet-encrypted-fields
Symmetrically encrypted model fields for Django
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is actively maintained, has low install friction, and solves a real problem for encrypting sensitive Django model fields. However, verify the license status before use—the metadata shows no SPDX or raw license text. Requires Python >=3.10 and Django 4.2+, so confirm compatibility with your project's versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10 and Django 4.2 or later.
- Low install friction with only two runtime dependencies (Django and cryptography).
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in commercial or proprietary projects.
last release 2026-04-14 (122 days) · last repo commit 2026-08-10 · 149 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 359,135 downloads/mo, #7,253 on PyPI
Alternatives
Verify before relying
pip install django-fernet-encrypted-fields
# In settings.py
SALT_KEY = '0123456789abcdefghijklmnopqrstuvwxyz'
# In models.py
from django.db import models
class MyModel(models.Model):
text_field = EncryptedTextField()- Which specific encrypted field types are available and their exact APIs.
- Whether key rotation via SALT_KEY list works with all supported Django versions.
- Performance impact of encryption/decryption on query performance and bulk operations.
- How SECRET_KEY_FALLBACKS interacts with the SALT_KEY rotation mechanism.
What it is and what it does
django-fernet-encrypted-fields adds transparent encryption to Django model fields using Fernet symmetric encryption from the cryptography library. When you define an encrypted field, data is automatically encrypted before storage and decrypted on retrieval, with the encryption key managed via Django settings.
The package supports key rotation through SALT_KEY, which can be a list where the first key encrypts new data and all keys are tried for decryption. It also supports SECRET_KEY rotation via SECRET_KEY_FALLBACKS for Django >=4.1. The encrypted fields maintain the same APIs as their unencrypted Django counterparts.
Use it for
- Encrypt personally identifiable information in a Django database without changing application code.
- Implement key rotation policies by maintaining a list of SALT_KEY values and re-saving records to migrate to new encryption keys.
- Store sensitive data encrypted at rest while maintaining Django ORM access.
- Migrate from an older django-encrypted-fields package to a maintained successor.
- Comply with data protection requirements by encrypting specific model fields without a separate encryption layer.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is actively maintained, has low install friction, and solves a real problem for encrypting sensitive Django model fields. However, verify the license status before use—the metadata shows no SPDX or raw license text. Requires Python >=3.10 and Django 4.2+, so confirm compatibility with your project's versions.
Install
django-fernet-encrypted-fields on PyPI
Before you install
Low install friction with only two runtime dependencies (Django and cryptography). The package is actively maintained with a recent release and no known vulnerabilities.
Requires Python >=3.10 and Django 4.2 or later.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in commercial or proprietary projects.
Quickstart
pip install django-fernet-encrypted-fields
# In settings.py
SALT_KEY = '0123456789abcdefghijklmnopqrstuvwxyz'
# In models.py
from django.db import models
class MyModel(models.Model):
text_field = EncryptedTextField()
Verify before relying
- Which specific encrypted field types are available and their exact APIs.
- Whether key rotation via SALT_KEY list works with all supported Django versions.
- Performance impact of encryption/decryption on query performance and bulk operations.
- How SECRET_KEY_FALLBACKS interacts with the SALT_KEY rotation mechanism.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesDjangocryptography |
| Maintenance | Actively maintained 122 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 359,135 / month, #7,253 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: django_fernet_encrypted_fields-0.4.0-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 › “django data at rest encryption”
- django-fernet-encrypted-fieldsProvides Django model fields that encrypt data at rest using Fernet…
- django-encrypted-model-fieldsWraps Django model fields with transparent encryption using the…
- django-fernet-fields-v2Provides Fernet symmetric encryption for Django model fields,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Cryptography packages
Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.
cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.
Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.
PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.
See also django-fernet-fields-v2 · fernet · djfernet · django-encrypted-model-fields · django-cryptography-django5 · django-cryptography-5 · django-hashid-field · django-cryptography · kasa-crypt