{ "info": { "author": "Serhii Zavadskyi", "author_email": "sz@3yourmind.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Database", "Topic :: Utilities" ], "description": "# django_obfucat\n\nDjango ORM driven database obfuscation is making GDPR great again!\n\n`django_obfucat` is useful when your developers need production database dump to \nexperiment with it locally, and test fixtures or sample dump are too synthetic for that.\nBut production data contains private data, that you must not disclose or share.\nData obfuscation may help in this case. Data, being anonymized, while still having \nreal-looking shape, is exactly what developers need for testing.\n\nWith `django_obfucat` you can quickly replace names, addresses and other deanonymizing\ninfo with fake data, and do it multiple times, or automatically.\n\n## installation\n\n```bash\n$ pip install django_obfucat\n```\nAdd `'django_obfucat'` to `INSTALLED_APPS`\n\n## workflow\n\n### as developer\n\n1. Run `./manage.py obfucat_update` after modifying any of \nyour model classes. This will create (and update) file `data-obfuscation-rules.json`\nin your Django project root.\n\n2. Run `./manage.py obfucat_validate` and be informed of any \nfields that might need an obfuscator\n\n3. Decide if those fields need obfuscators. For full list of available obfuscators,\nrun `./manage.py obfucat_list`\n\n4. Edit `data-obfuscation-rules.json` and replace values equal `\"\"` with the \nappropriate obfuscator name\n\n5. Commit `data-obfuscation-rules.json` with everything else\n\n\n### as devops\n\n0. Make sure you have backup of your DB\n\n1. Create empty table `obfucatable` in target database:\n`create table obfucatable (id int);`\n\n2. Run `./manage.py obfucat_obfuscate`\n\n3. Make DB dump for your developers\n\n### as obfuscator\n\nIt might not be necessary to add sophisticated obfuscators. You probably want\nto reuse an existing obfuscator or just use \"mask\" or \"empty\".\n\nAdd a function with one argument (original value) like this in your code:\n\n```python\nfrom django_obfucat.obfuscators import obfuscator\n\n@obfuscator\ndef arbitrary_field(v): # \n \"\"\"This docstring will be shown by ./manage.py list_obfuscators\"\"\"\n return 'XXX'\n```\n\nNext, your obfuscator will be added in registry use the function's name, \ni.e. `arbitrary_field` as obfuscator in data-obfuscation-rules.json.\n\n## data-obfuscation-rules.json\n\nDefault path is `BASE_DIR/data-obfuscation-rules.json`, can be overridden in `settings.py`:\n\n```python\nOBFUSCATION_RULES_FILE_PATH = os.path.join(BASE_DIR, 'settings/data-obfuscation-rules.json')\n```\n\nThis pretty-formatted JSON file contains list of dicts. Each dict has at \nleast one key `table`, which is django app-name.ModelName. Second key `fields` \nis another dict with keys - model field names, values - obfuscator name or null \n(for no action on that field). \n\nBy default, only CharField and TextField and their inheritors will be subject to\nobfuscation. This means, other fields will have `null` as obfuscator, and will not\nbe touched. If you need to obfuscate other field types, create obfuscator,\nthat returns that value type.\n\nExample:\n```\n...\n {\n \"table\": \"auth.Permission\",\n \"fields\": {\n \"id\": null,\n \"name\": \"shuffle\",\n \"content_type\": null,\n \"codename\": null\n }\n },\n...\n```\nHere, we use `shuffle` obfuscator for table of model class `Permission` from\n`django.contrib.auth`. Other fields will keep their values. \n\nThis might seem obvious, but DON'T obfuscate primary key fields. Also, better not \nobfuscate ForeignKey fields.\n\nTables, that must be fully cleaned by obfuscator, do not have `fields` key. Note,\ntable is flushed with `DELETE FROM `. Any related foreign keyed relations\nwith `ON_DELETE=CASCADE` will be deleted automatically. On the other hand, \nrelations with `ON_DELETE=PROTECT` will crash obfuscation.\n\n## known limitations\n\n* If your models have custom default managers with custom `get_queryset()`, that does \nnot return all objects, respectively not all records will be obfuscated.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/3yourmind/django-obfucat", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-obfucat", "package_url": "https://pypi.org/project/django-obfucat/", "platform": "", "project_url": "https://pypi.org/project/django-obfucat/", "project_urls": { "Homepage": "https://bitbucket.org/3yourmind/django-obfucat" }, "release_url": "https://pypi.org/project/django-obfucat/0.0.10/", "requires_dist": [ "mimesis" ], "requires_python": "", "summary": "Data obfuscation tool for GDPR-compliant development process", "version": "0.0.10" }, "last_serial": 5149209, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "b2434cfcf2d73643e31defd2e255f7a1", "sha256": "1e0ebacc0a1d972835f78cae6490e4c601212d8f1c3703d9e8bacb5558cfc8e4" }, "downloads": -1, "filename": "django_obfucat-0.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b2434cfcf2d73643e31defd2e255f7a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11017, "upload_time": "2019-04-16T09:49:41", "url": "https://files.pythonhosted.org/packages/6c/47/97561e5b3ef2cff7d170b1c4b5af88b5af7356695f204b0edbc750f399b8/django_obfucat-0.0.10-py2.py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "79d113790ef35a7a28c4cd1d97c64582", "sha256": "a35555e82327324c54821051da85f37e68574d7094c1901773452798c45c7a2a" }, "downloads": -1, "filename": "django_obfucat-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79d113790ef35a7a28c4cd1d97c64582", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10933, "upload_time": "2019-04-13T21:49:56", "url": "https://files.pythonhosted.org/packages/75/f1/1a6a0fe5702879042c92e4ef9cd41bf562122dd1d83fe84d0fac27e3e153/django_obfucat-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8aa7650f11b067f18b6202f5ef92c31", "sha256": "bca08a5631c9c66febc8215edf0c6f61731f4c56ef9f3eafd85573d9230d765b" }, "downloads": -1, "filename": "django_obfucat-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f8aa7650f11b067f18b6202f5ef92c31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8651, "upload_time": "2019-04-13T21:49:59", "url": "https://files.pythonhosted.org/packages/42/68/d069b966c8b97d6c8c3e010c0b58a315fc86e3fa24d4496e679203a5059f/django_obfucat-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "de5d0fc98444f82eca22de12ec9f5ef6", "sha256": "928024564c4a882956e4794306d5def2004b424c2f380aa15b44c38b9b3c698c" }, "downloads": -1, "filename": "django_obfucat-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de5d0fc98444f82eca22de12ec9f5ef6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10991, "upload_time": "2019-04-14T17:41:00", "url": "https://files.pythonhosted.org/packages/5b/3b/cc36d351b806a0be51450f8eacbb85eeea686fc72757f92350ba5c908a16/django_obfucat-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28bfd173099677f88533cfbb3da9d987", "sha256": "468224e689b149962c631b2783fa7157e2a0c81ffa3a62611fc5dddd9787539b" }, "downloads": -1, "filename": "django_obfucat-0.0.5.tar.gz", "has_sig": false, "md5_digest": "28bfd173099677f88533cfbb3da9d987", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8727, "upload_time": "2019-04-14T17:41:03", "url": "https://files.pythonhosted.org/packages/c9/c0/efa7d41a1372d513afb1310ac7bea06e9f47be6fa6fb01ebd9492daa48ef/django_obfucat-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "fbe7c38c1bd073f080be5b02c98d6b12", "sha256": "4d92c7bad3ecfcfec48dbe8f12213376f53574168cf48a819e8e0a67e86fbd3f" }, "downloads": -1, "filename": "django_obfucat-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fbe7c38c1bd073f080be5b02c98d6b12", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11138, "upload_time": "2019-04-14T17:53:34", "url": "https://files.pythonhosted.org/packages/99/2a/d14fd3dbc00c228971cdd7f72598b098ad73b0493185c9c6b27b34984d43/django_obfucat-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a71792dab21955b3e61fa065c31a8c", "sha256": "1df07cbb37f6d3aca016e947e10ae6cb3e78222c7eb6cf224fd9de43178364da" }, "downloads": -1, "filename": "django_obfucat-0.0.6.tar.gz", "has_sig": false, "md5_digest": "37a71792dab21955b3e61fa065c31a8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8838, "upload_time": "2019-04-14T17:53:38", "url": "https://files.pythonhosted.org/packages/b3/1c/215a947f8b25f6b59bdea02ea8a5181b88e8ba523a350628e00bb8dca8ab/django_obfucat-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "339721cccad87ca9298901897a87ea00", "sha256": "c10a070029d62d6ecd266b1191b018d9f2cb1a0460a97be3d9d97a8c530c5d5e" }, "downloads": -1, "filename": "django_obfucat-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "339721cccad87ca9298901897a87ea00", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11260, "upload_time": "2019-04-14T19:02:38", "url": "https://files.pythonhosted.org/packages/b9/95/7aaa64b3166fd23a8089ec27baea8715b9960229254c347e389dd0e9eb35/django_obfucat-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21abe755f2f596da719b8aabadf847ed", "sha256": "ba5ad9f6aac6feb186afbadfb976e04ffc56b6d47bb434eb8cf8ae5ab08a6cde" }, "downloads": -1, "filename": "django_obfucat-0.0.7.tar.gz", "has_sig": false, "md5_digest": "21abe755f2f596da719b8aabadf847ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8946, "upload_time": "2019-04-14T19:02:45", "url": "https://files.pythonhosted.org/packages/a6/a0/4d391756f936dfece9a0203464901a00674edf02676d075f0cc90d371ac3/django_obfucat-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "41169419341ff358a1b21507f593f8ae", "sha256": "27a3a28a0d5efe50039f5550d1682319d2500022cc28fd15c4622e72393792a0" }, "downloads": -1, "filename": "django_obfucat-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "41169419341ff358a1b21507f593f8ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14836, "upload_time": "2019-04-15T12:37:55", "url": "https://files.pythonhosted.org/packages/76/d1/cf62ae84d5e4761406b5f3435d92a1ed3029660aa8b708ab35b138605b55/django_obfucat-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a081c02781a5906e08d458fc5ff8854", "sha256": "0b13935d83dfa91b150ff8c05707e54832b00a03c37dc8c87bbd6a7d457fc0ac" }, "downloads": -1, "filename": "django_obfucat-0.0.8.tar.gz", "has_sig": false, "md5_digest": "4a081c02781a5906e08d458fc5ff8854", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8757, "upload_time": "2019-04-15T12:38:00", "url": "https://files.pythonhosted.org/packages/11/36/1ca489c5eed2408d20c0d6f629b2fe19a7136edeba25bb3d9098386ba28b/django_obfucat-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b2434cfcf2d73643e31defd2e255f7a1", "sha256": "1e0ebacc0a1d972835f78cae6490e4c601212d8f1c3703d9e8bacb5558cfc8e4" }, "downloads": -1, "filename": "django_obfucat-0.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b2434cfcf2d73643e31defd2e255f7a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11017, "upload_time": "2019-04-16T09:49:41", "url": "https://files.pythonhosted.org/packages/6c/47/97561e5b3ef2cff7d170b1c4b5af88b5af7356695f204b0edbc750f399b8/django_obfucat-0.0.10-py2.py3-none-any.whl" } ] }