--- id: django-anon version: "0.3.2" license: MIT license_treatment: permissive maintenance: dormant --- # django-anon — Anonymize production data so it can be safely used in not-so-safe environments License: permissive · Maintenance: dormant · Downloads: 140.9K/mo ## What it is and what it does django-anon is a Django utility that replaces sensitive data in your database with fake or static values, letting you safely share production databases with developers for debugging and performance testing. You define anonymization rules by subclassing BaseAnonymizer and specifying which model fields get which fake values (email, name, phone, etc.), then call run() to apply the changes in bulk across your database. The package includes built-in fake-data generators (fake_email, fake_name, fake_phone_number, and others) and lets you plug in external libraries like Faker for higher-quality synthetic data. You can also define custom logic per row using lazy attributes or a clean() method, and filter which rows to anonymize via a custom QuerySet. It uses bulk updates under the hood to keep large-table operations fast. Use it for: - Share a production database snapshot with your development team without exposing customer PII or payment information. - Set up a realistic test environment that mirrors production data patterns without legal or privacy risks. - Reproduce bugs in a production-like database state while keeping sensitive data out of logs and version control. - Prepare data for performance testing on real-scale datasets without compliance violations. - Anonymize user records before exporting data for analytics or third-party audits. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Anonymizes Django model data in place using bulk operations, replacing sensitive fields with fake or static values to create safe development copies of production databases. Yes, if you are on Django 1.8–3.0 and Python 2.7 or 3.7. The package is stable and does its job well for bulk anonymization. No, if you need active maintenance or support for newer Django or Python versions—dormancy since 2021 means no updates for newer framework versions. Consider it for legacy projects or as a starting point you may need to fork. ## Install pip install django-anon uv add django-anon poetry add django-anon ## Installing django-anon Before you install: Low install friction with just two runtime dependencies (django-bulk-update and django-chunkator). Maintenance is dormant—last release was 2021-07-28, so expect no active bug fixes or updates for newer Django versions. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install django-anon import anon class PersonAnonymizer(anon.BaseAnonymizer): email = anon.fake_email is_admin = False class Meta: model = Person PersonAnonymizer().run() Requires a Django project with models already defined; will modify your current database in place when run() is called. Verify before relying: - Whether the package works with Django versions released after 2021 (documented support ends at 3.0) - Whether Python 2.7 support remains functional or if the package is effectively Python 3 only in practice - Real-world performance on databases larger than those in the maintainer's test suite ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 140.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django database anonymization, production data masking, bulk data anonymization, django fake data generation, database privacy tool, development database sanitization, django model anonymizer, data-privacy, django-tool, bulk-operations [View on SkillFed](https://skillfed.io/packages/django-anon) · [View on PyPI](https://pypi.org/project/django-anon/)