djfernet
What it is and what it does
djfernet is a Django extension that encrypts and decrypts model field values using Fernet symmetric encryption from the cryptography library. It wraps Django's BinaryField to transparently handle encryption at the ORM layer, so encrypted data is stored in your database while your application code reads and writes plaintext values.
The package targets Django 4.0 and later on Python 3, and has been tested with PostgreSQL, SQLite, and MySQL. It is a maintained fork of an earlier django-fernet-fields project. The project is currently abandoned—no releases since February 2022—so you should treat it as a reference implementation or candidate for forking rather than an actively supported dependency.
Use it for:
- Encrypt sensitive user data (passwords, tokens, PII) at rest in Django models while keeping application code simple
- Store encrypted credentials or API keys in a Django database without managing separate key vaults
- Comply with data protection regulations by encrypting specific model fields transparently
- Migrate from unencrypted to encrypted storage for existing Django applications using Fernet
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Fernet symmetric encryption for Django model fields, allowing you to store encrypted data in PostgreSQL, SQLite, MySQL, or other Django-compatible databases.
No. The package is abandoned (1643 days since last release) with no maintenance signals, and high install friction from source-only distribution. If you need Django field encryption, evaluate actively maintained alternatives or fork this project yourself if you understand the cryptography requirements and can commit to maintenance.
Install
djfernet on PyPI
pip
pip install djfernetuv
uv add djfernetpoetry
poetry add djfernetInstalling djfernet
Before you install
High install friction due to source distribution only. Package is abandoned as of 1643 days since last release, with no maintenance activity or repository signals available. Consider whether you can commit to maintaining a fork if issues arise.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
pip install djfernet
from djfernet import EncryptedCharField
class MyModel(models.Model):
secret = EncryptedCharField()
Requires Django 4.0 or later and Python 3.8 or later; cryptography library must be available.
Verify before relying
- Whether cryptography library is automatically installed as a dependency or must be manually added
- Current compatibility with Django versions beyond 4.0 given the 1643-day gap since last release
- Whether the package works reliably with modern Python 3.x versions despite no recent updates
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,643 days since the last release |
| First released | |
| Downloads | 84,771/month — #13,975 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: djfernet-0.8.1.tar.gz
Keywords: fernet, cryptography, django
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
django-fernet-fields-v2Provides Fernet symmetric encryption for Django…
permissive · top 5,000 on PyPI
fernetA pure Python implementation of the Fernet…
permissive · top 15,000 on PyPI
django-fernet-encrypted-fieldsProvides Django model fields that encrypt data…
unclear · top 15,000 on PyPI
django-cryptography-django5Encrypts and decrypts data in Django models…
permissive · top 15,000 on PyPI
django-cryptography-5Provides encrypted model fields and…
permissive · top 15,000 on PyPI
django-cryptographyWraps Python's cryptography library to add…
permissive · top 15,000 on PyPI
django-encrypted-model-fieldsWraps Django model fields with transparent…
permissive · top 15,000 on PyPI
daveyImplements the Discord Audio & Video End-to-End…
permissive · top 5,000 on PyPI
django-bitfieldProvides a BitField model field for Django that…
unclear · top 15,000 on PyPI
django-sequencesProvides gapless sequence generation for Django…
permissive · top 15,000 on PyPI