{ "info": { "author": "Thomas Levine", "author_email": "_@thomaslevine.com", "bugtrack_url": null, "classifiers": [], "description": "shrebx\n============\n`Thomas Levine `_\n\nRead and write secrets from a configuration file.\n\nInstall from PyPI. ::\n\n pip install shrebx\n\nI originally made this for secret settings in a Django project,\nso here's the example from that.\n\nFirst, load the secrets. ::\n\n import os\n\n from shrebx import shrebx\n\n BASE_DIR = os.path.dirname(os.path.dirname(__file__))\n SECRETS = shrebx(os.path.join(BASE_DIR, '.secrets'),\n manual_fields = ['DATABASE_PASSWORD'],\n random_fields = ['SECRET_KEY'])\n\nThen set them to things. ::\n\n SECRET_KEY = SECRETS['SECRET_KEY']\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'dadaportal',\n 'USER': 'www-data',\n 'HOST': 'localhost',\n 'PASSWORD': SECRETS['DATABASE_PASSWORD'],\n }\n }\n\nIf you have a lot of secrets, consider using ``locals``. ::\n\n locals().update(shrebx(random_fields = ['THIS_PASSWORD', 'THAT_PASSWORD'],\n manual_fields = ['EMAIL_ADDRESS' ))\n", "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/tlevine/shrebx", "keywords": null, "license": "AGPL", "maintainer": null, "maintainer_email": null, "name": "shrebx", "package_url": "https://pypi.org/project/shrebx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/shrebx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tlevine/shrebx" }, "release_url": "https://pypi.org/project/shrebx/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Load secrets from a configuration file, generating them if needed.", "version": "0.0.1" }, "last_serial": 1521227, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a232c8f834f9cf4b920d901804a8c8f2", "sha256": "61739c07be6546695df2eaa2076ebc854a8c5b9e08818fbd74a0c5616a36136a" }, "downloads": -1, "filename": "shrebx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a232c8f834f9cf4b920d901804a8c8f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1390, "upload_time": "2015-04-26T00:29:42", "url": "https://files.pythonhosted.org/packages/34/e0/351cb95771860dffa2461ce64940ff2594aebbc0c34463c6244ffdff8460/shrebx-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a232c8f834f9cf4b920d901804a8c8f2", "sha256": "61739c07be6546695df2eaa2076ebc854a8c5b9e08818fbd74a0c5616a36136a" }, "downloads": -1, "filename": "shrebx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a232c8f834f9cf4b920d901804a8c8f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1390, "upload_time": "2015-04-26T00:29:42", "url": "https://files.pythonhosted.org/packages/34/e0/351cb95771860dffa2461ce64940ff2594aebbc0c34463c6244ffdff8460/shrebx-0.0.1.tar.gz" } ] }