{ "info": { "author": "Cambridge Yang", "author_email": "thisiscam95@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "django-db-obfuscate-id\n============\n\nA reusable Django app that psuedo encrypts your id at database level.\n\nWhat is this\n------------\n\nThis is a small app that helps help you change your Autofield ids of your models into a \"psuedo-encrypted\" id sequence\nThe encryption is done on database layer so you won't have to worry about complicating your queries or sketching your model managers\n\nInstallation\n------------\n\nTo get the latest stable release from PyPi\n\n.. code-block:: bash\n\n pip install db-obcuscate-id\n\nTo get the latest commit from GitHub\n\n.. code-block:: bash\n\n pip install -e git+git://github.com/thisiscam/django-db-obfuscate-id.git#egg=db_obfuscate\n\nAdd ``db_obfuscate`` to your ``INSTALLED_APPS``\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...,\n 'db_obfuscate',\n )\n\nAdd full paths to your models to your ``settings.py``\n\n.. code-block:: python\n\n ENCRYPT_ID_FOR_MODELS = (\n 'django.contrib.auth.models.User',\n ...\n )\n\nAlternatively, you can set a class attribute flag as follow\n\n.. code-block:: python\n\n class MyEncrypedIdModel(models.Model):\n pseudo_encrypt_id = True\n\n\nNote: Currently, the app only supports postgres, and takes advantage of psuedo-encrypt scripts given here https://wiki.postgresql.org/wiki/Pseudo_encrypt\n\nMore support to be added in the future, and feel free to PR since I'm not using other databases other than postgres now, and will only be updating this repo on a per-use basis\n\nUsage\n-----\n\nAfter setting up, you can conveniently call the management command\n\n.. code-block:: bash\n\n python manage.py db --encrypt-all #this will encrypt all your models specified in settings.py and those flagged true for pseudo_encrypt_id\n\n python manage.py db --encrypt-model myapp.models.SomeModelA myapp.models.SomeModelB #this will encrypt all the models specified in this command, use this if you want a one time setting\n\n\nAfter one of the two commands, your according models will be using a encryped sequence instead of the normal increasing sequence, note that items in the database won't be migrated to the new sequence, so you do have risk that the newly generated ids will collide onto the old existing ids! I'm still thinking of a good solution to this but feel free to PR if you have one. For now, the seemingly safest way is to use an entirely new database with this app and maybe migrate your data to the new database\n\nContribute\n----------\n\nIf you want to contribute to this project, please perform the following steps\n\n.. code-block:: bash\n\n # Fork this repository\n # Clone your fork\n mkvirtualenv -p python2.7 db-obcuscate-id\n make develop\n\n git co -b feature_branch master\n # Implement your feature and tests\n git add . && git commit\n git push -u origin feature_branch\n # Send us a pull request for your feature branch\n\nIn order to run the tests, simply execute ``tox``. This will install two new\nenvironments (for Django 1.6 and Django 1.7) and run the tests against both\nenvironments.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thisiscam/django-db_obfuscate-id", "keywords": "django,app,db,encryped_id", "license": "The MIT License", "maintainer": null, "maintainer_email": null, "name": "db-obcuscate-id", "package_url": "https://pypi.org/project/db-obcuscate-id/", "platform": "OS Independent", "project_url": "https://pypi.org/project/db-obcuscate-id/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/thisiscam/django-db_obfuscate-id" }, "release_url": "https://pypi.org/project/db-obcuscate-id/0.1/", "requires_dist": null, "requires_python": null, "summary": "A reusable Django app that psuedo encrypts your id from a database level.", "version": "0.1" }, "last_serial": 1398062, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5c623e8438d93b0243f548acf33c8b3a", "sha256": "437b9ae20d44ec0ab999a59ad3fcb92de312b66392680e5af511803143927934" }, "downloads": -1, "filename": "db-obcuscate-id-0.1.tar.gz", "has_sig": false, "md5_digest": "5c623e8438d93b0243f548acf33c8b3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11356, "upload_time": "2015-01-27T07:52:26", "url": "https://files.pythonhosted.org/packages/05/c3/91cbaf2847a46709527065d5d83c7e1ea7153cc4fc1257354fc58a4e86c6/db-obcuscate-id-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c623e8438d93b0243f548acf33c8b3a", "sha256": "437b9ae20d44ec0ab999a59ad3fcb92de312b66392680e5af511803143927934" }, "downloads": -1, "filename": "db-obcuscate-id-0.1.tar.gz", "has_sig": false, "md5_digest": "5c623e8438d93b0243f548acf33c8b3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11356, "upload_time": "2015-01-27T07:52:26", "url": "https://files.pythonhosted.org/packages/05/c3/91cbaf2847a46709527065d5d83c7e1ea7153cc4fc1257354fc58a4e86c6/db-obcuscate-id-0.1.tar.gz" } ] }