django-anonymizer released

Posted in:

It is common practice in develpment to use a database that is very similar in content to the real data. It is tempting to download a copy of the production database for smaller apps (or a trimmed version). The problem is that this can lead to having copies of sensitive customer data on development machines and other placers (like automatic backups). This Django app provides an easy and customizable way to anonymize data in your database, while leaving the structure intact and the data looking sensible.

Using some manage.py commands, it will introspect your models to generate basic 'anonymizers' for you, attempting to guess the type of data in fields based on Django field type and field name (e.g. 'email', 'name', 'address' etc), and generate appropriate fake data. These guesses will probably need to be tweaked with knowledge of what is actually stored in your fields. You then run the anonymizers to change your data.

It is currently in a working state, although not all model fields are supported. It has support for the 'unique' constraint, to avoid database IntegrityErrors, and the 'max_length' attribute, but does not yet support 'unique_together'.

Download: PyPI

Source: GitHub

The README has fairly good documentation, I don't know when I'll get around to writing some proper docs!

It uses the Faker package by Dylan Clendenin (thanks!).


UPDATE: Fuller docs available now

Comments §

Comments should load when you scroll to here...