--- id: django-cryptography version: "1.1" license: BSD-3-Clause license_treatment: permissive maintenance: dormant --- # django-cryptography — Easily encrypt data in Django License: permissive · Maintenance: dormant · Downloads: 197.1K/mo ## 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 above — verify before relying. Wraps Python's cryptography library to add transparent field-level encryption to Django models, and provides a drop-in replacement for Django's own cryptographic primitives. 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 pip install django-cryptography uv add django-cryptography poetry add django-cryptography ## Installing django-cryptography 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. 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)) Requires Django 2.2, 3.2, or 4.0 and cryptography 2.0 or later; Python 3.6 or higher. 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_current - Install friction: low - Maintenance: dormant - Downloads: 197.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django field encryption, encrypt django model fields, database encryption django, symmetric encryption django, django cryptography wrapper, django sensitive data protection, bidirectional field encryption, django-orm, field-encryption, data-protection [View on SkillFed](https://skillfed.io/packages/django-cryptography) · [View on PyPI](https://pypi.org/project/django-cryptography/)