--- id: django-encrypted-model-fields version: "0.6.5" license: MIT license_treatment: permissive maintenance: abandoned --- # django-encrypted-model-fields — A set of fields that wrap standard Django fields with encryption provided by the python cryptography library. License: permissive · Maintenance: abandoned · Downloads: 523.8K/mo ## 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 above — verify before relying. Wraps Django model fields with transparent encryption using the cryptography library, storing encrypted data in the database while allowing normal field access in Python code. 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 pip install django-encrypted-model-fields uv add django-encrypted-model-fields poetry add django-encrypted-model-fields ## Installing django-encrypted-model-fields 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. 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) 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)). 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_current - Install friction: low - Maintenance: abandoned - Downloads: 523.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django encrypted fields, encrypt django model data, transparent field encryption, django cryptography integration, encrypted database fields, django data encryption at rest, secure django model fields, django-orm, field-encryption, abandoned [View on SkillFed](https://skillfed.io/packages/django-encrypted-model-fields) · [View on PyPI](https://pypi.org/project/django-encrypted-model-fields/)