dj_anonymizer is a utility designed to anonymize production databases with various types of mock data, specifically designed for use within Django projects.
Project works with Django 4.2 or higher and Python 3.8 or higher.
Anonymize django database. Big-data anonymizer. Preply team.
License: MIT License
dj_anonymizer is a utility designed to anonymize production databases with various types of mock data, specifically designed for use within Django projects.
Project works with Django 4.2 or higher and Python 3.8 or higher.
Since Django 2.2 bulk-update()
method will be available out the box for any Model.
Need to remove django-bulk-update
dependency for Django>=2.2
For anonymized DB will be great to have same password for all users
It will help easilly login via any user by knowing username/password
now we suport two type of fileds:
and it's possible to do via anonym_field.function
but easier way is to support anonym_field.password
out the box
Need to add the check for comparing specified_fields
and model_fields
before start execution anonymization cause anonymization process can raise an exception in the middle of it in case of different list of existing
and specified
fields
it may be done in a way like described below
python manage.py anonymize_db --only django.contrib.auth.models.User
In cases like
class Musician(models.Model):
instrument = models.CharField(max_length=100)
class Album(models.Model):
artist = models.ForeignKey(
'app.Musician',
on_delete=models.PROTECT
)
Order matters for cleaning models
For example
from dj_anonymizer import register_models
register_models.register_clean([
Musician, Album
])
Will raise
django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Musician' because they are referenced through a protected foreign key: ...
And in case
from dj_anonymizer import register_models
register_models.register_clean([
Album, Musician
])
All will be good
By default register_clean is doing DELETE FROM "table_name"
here
Need to add possibility do it via TRUNCATE TABLE "table_name"
If dump is made not from latest database snapshot there is a possibility that a table exists in code but does not exist in the database.
Now in such cases anonymization execution fails
Think it can be mitigated with an additional flag for anonymizer and/or warning during execution
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.