{ "info": { "author": "Guillaume Blaquiere", "author_email": "guillaume.blaquiere@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Overview\n\nPython library help to use [Berglas](https://github.com/GoogleCloudPlatform/berglas), to encrypt and to decrypt the secrets stored in a GCP storage.\n\nSee [Berglas](https://github.com/GoogleCloudPlatform/berglas) for details about bucket bootstrapping and secret creation\n\n# Library Usage\n\nYou have to get the library\n```\npip install berglas-python\n```\n\nThen use it in the same way as [Go library](https://github.com/GoogleCloudPlatform/berglas/blob/master/README.md#library-usage)\n\nThe library berglas_python library is able to:\n\n- Encrypt and upload the secrets\n- Download and decrypt any secrets that match the [Berglas environment variable reference syntax](https://github.com/GoogleCloudPlatform/berglas/blob/master/doc/reference-syntax.md)\n- Replace the value for the environment variable with the decrypted secret\n\nHere an example of usage\n```\nimport os\n\nimport berglas_python as berglas\n\nproject_id = os.environ.get(\"MY-PROJECT\")\n\n# This higher-level API parses the secret reference at the specified\n# environment variable, downloads and decrypts the secret, and replaces the\n# contents of the given environment variable with the secret result.\n\nberglas.Replace(project_id, \"MY-SECRET\")\n\n# This lower-level API parses the secret reference, downloads and decrypts\n# the secret, and returns the result. This is useful if you need to mutate\n# the result.\nmy_secret = os.environ.get(\"MY-SECRET\")\nplaintext = berglas.Resolve(project_id, my_secret)\nos.environ.unsetenv(\"MY-SECRET\")\nos.environ.setdefault(\"MY-SECRET\", plaintext)\n\n# This is lower-level API encrypts the plaintext string and uploads the blob\nberglas.Encrypt(project_id, 'MY-BUCKET/MY-SECRET-FILE', 'STRING-TO-ENCRYPT')\n```\n\n# License\n\nThis library is licensed under Apache 2.0. Full license text is available in\n[LICENSE](https://github.com/guillaumeblaquiere/berglas-python/tree/master/LICENSE).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/guillaumeblaquiere/berglas-python", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "berglas-python", "package_url": "https://pypi.org/project/berglas-python/", "platform": "", "project_url": "https://pypi.org/project/berglas-python/", "project_urls": { "Homepage": "https://github.com/guillaumeblaquiere/berglas-python" }, "release_url": "https://pypi.org/project/berglas-python/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Decipher the Berglas keys", "version": "0.3.0" }, "last_serial": 5756853, "releases": { "0.2.5": [ { "comment_text": "", "digests": { "md5": "497e2dd07eefda4d522ccece82f34d25", "sha256": "df8a7ce70d9fab523514ed94e98f810800aa655757a923efd61f19395133a602" }, "downloads": -1, "filename": "berglas_python-0.2.5.tar.gz", "has_sig": false, "md5_digest": "497e2dd07eefda4d522ccece82f34d25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3330, "upload_time": "2019-06-07T15:45:11", "url": "https://files.pythonhosted.org/packages/c9/92/16db5b90b5e14b882ce1234437e4a41857cdbac07aec411f5fc09273eff0/berglas_python-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "513a1af95e28d08de90ead53f8e3f07a", "sha256": "0846136e89b7952f0c596554276e3916b4fab28898363effb13d8cac57317ac7" }, "downloads": -1, "filename": "berglas_python-0.3.0.tar.gz", "has_sig": false, "md5_digest": "513a1af95e28d08de90ead53f8e3f07a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4598, "upload_time": "2019-08-29T20:42:21", "url": "https://files.pythonhosted.org/packages/40/85/d48f2d14759730dc123e4c436e58ddb91edc1469d6b0a5fba21ba4167bdd/berglas_python-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "513a1af95e28d08de90ead53f8e3f07a", "sha256": "0846136e89b7952f0c596554276e3916b4fab28898363effb13d8cac57317ac7" }, "downloads": -1, "filename": "berglas_python-0.3.0.tar.gz", "has_sig": false, "md5_digest": "513a1af95e28d08de90ead53f8e3f07a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4598, "upload_time": "2019-08-29T20:42:21", "url": "https://files.pythonhosted.org/packages/40/85/d48f2d14759730dc123e4c436e58ddb91edc1469d6b0a5fba21ba4167bdd/berglas_python-0.3.0.tar.gz" } ] }