django-cryptography
Easily encrypt data in Django
Decision gist · record as of 2026-08-14
Yes, if you are using Django 2.2, 3.2, or 4.0 and need straightforward field-level encryption without external key management. The package is stable and has no known vulnerabilities. However, be aware that the last release was in April 2022; if you require support for newer Django versions or active maintenance, evaluate whether the dormant status aligns with your project's lifecycle.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django 2.2, 3.2, or 4.0 and cryptography 2.0 or later; Python 3.6 or higher.
- Low install friction with a pure-Python wheel.
- Maintenance is dormant—last release was in April 2022—but the repository remains active and the package is marked Production/Stable.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2022-04-06 (1591 days) · last repo commit 2024-11-18 · 408 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 197,144 downloads/mo, #9,768 on PyPI
Alternatives
Verify before relying
pip install django-cryptography
from django.db import models
from django_cryptography.fields import encrypt
class MyModel(models.Model):
sensitive_data = encrypt(models.CharField(max_length=50))- Whether the package works with Django versions released after 4.0.
- Current compatibility with cryptography versions beyond 2.0.
- Performance impact of field-level encryption on query operations.
What it is and what it does
Django Cryptography provides a lightweight wrapper around the cryptography library to encrypt individual Django model fields transparently. When you wrap a field with the encrypt() function, data is automatically encrypted before storage and decrypted on retrieval, using symmetric encryption that supports bidirectional access. The package also offers a drop-in replacement for Django's built-in cryptographic primitives, allowing you to substitute cryptography as the backend provider.
The package is designed for developers who need to protect sensitive data at the field level without managing encryption keys manually or writing custom serialization logic. It integrates directly into Django's ORM, so encrypted fields behave like normal fields in queries and model definitions. Dependencies are minimal: Django, cryptography, and django-appconf for configuration management.
Use it for
- Store personally identifiable information (names, emails, phone numbers) encrypted in the database while keeping queries simple.
- Protect payment card details or financial account numbers in a Django application without custom encryption middleware.
- Replace Django's default cryptographic backend with cryptography for stronger or more modern algorithms.
- Encrypt sensitive user preferences or medical data in healthcare or financial Django applications.
- Add field-level encryption to an existing Django project with minimal code changes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using Django 2.2, 3.2, or 4.0 and need straightforward field-level encryption without external key management.
The package is stable and has no known vulnerabilities. However, be aware that the last release was in April 2022; if you require support for newer Django versions or active maintenance, evaluate whether the dormant status aligns with your project's lifecycle.
Install
django-cryptography on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was in April 2022—but the repository remains active and the package is marked Production/Stable. Suitable for projects that do not require frequent updates.
Requires Django 2.2, 3.2, or 4.0 and cryptography 2.0 or later; Python 3.6 or higher.
License in practice
BSD-3-Clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-cryptography
from django.db import models
from django_cryptography.fields import encrypt
class MyModel(models.Model):
sensitive_data = encrypt(models.CharField(max_length=50))
Verify before relying
- Whether the package works with Django versions released after 4.0.
- Current compatibility with cryptography versions beyond 2.0.
- Performance impact of field-level encryption on query operations.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesDjangocryptographydjango-appconf |
| Maintenance | Dormant 1,591 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 197,144 / month, #9,768 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.2Framework :: Django :: 4.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Security :: Cryptography |
Evidence: django_cryptography-1.1-py2.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 field encryption”
- django-cryptographyWraps Python's cryptography library to add transparent field-level…
- 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…
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-django5 · django-encrypted-model-fields · django-cryptography-5 · cryptography · django-fernet-fields-v2 · noiseprotocol · djfernet · fernet · django-private-storage · pqcrypto