{ "info": { "author": "Arnau Villoro", "author_email": "arnau@villoro.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Manufacturing", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "# Palette Material Design\n[![Build Status](https://travis-ci.com/villoro/v-crypt.svg?branch=master)](https://travis-ci.com/villoro/v-crypt)\n[![codecov](https://codecov.io/gh/villoro/v-crypt/branch/master/graph/badge.svg)](https://codecov.io/gh/villoro/v-crypt)\n\nUtility to easily store password/secrets. It uses `Fernet` from the [cryptography](https://cryptography.io/en/latest/) module instead of reinventing the wheel.\n\nFernet is a symmetric encryption that uses 128-bit AES in CBC mode and PKCS7 padding with HMAC using SHA256 for authentication. You can read more about it [here](https://medium.com/coinmonks/if-youre-struggling-picking-a-crypto-suite-fernet-may-be-the-answer-95196c0fec4b).\n\n## Why v-crypt?\nIt is always annoying to deal with secrets and passwords in python especially if you work with other people. What we found that worked best for us was:\n\n* Create one master private password (ignored from git)\n* Have dict-like file with the rest of passwords encrypted\n\nThis module provides the class `Cipher` to handle that easily.\n\nThe idea behind this module is to be able to **create a `json` or `yaml` with encrypted secrets**. The keys will be public but the values won't. This way you can **store the dictionary of secrets in git** and easily share them with other people working in the same project. You will only need to **share the `master.password` once**. And all the other passwords/secrets will be tracked with git.\n\n## Installation\n\nYou can install it with pip by running:\n\n pip install v-crypt\n\n## Usage\n\n```python\nfrom v_crypt import Cipher\n\n# Create a cipher instance\ncipher = Cipher()\n\n# Create a new master password\ncipher.create_password()\n\n# Store a secret\ncipher.save_secret(\"secret\", \"I like python\")\n\n# Retrive a secret\ncipher.get_secret(\"secret\")\n```\n\n### Customization\n\nThere are three paramaters to customize the cipher:\n\n1. **secrets_file:** path of the file with secrets. Can be a `json` or `yaml`.\n2. **filename_master_password:** path of the file with the master password\n3. **environ_var_name:** if passed it allows to read the master password from an environ var.\n\n> For `yaml` you need to install `pyyaml`\n\nFor example you could do:\n\n```python\ncipher = Cipher(secrets_file=\"data/secrets.yaml\", filename_master_password=\"data/master.secret\")\n```\n\nThis will allow you to store both the `master.password` and `secrets.yaml` in the folder `data`.\n\nThere is not much more customization since the idea is to keep it simple.\n\n### Integrating it in other projects\nWe usually have one or more python files with utilities, for example `utilities.py`.\n\nTo use v_crypt we initiallize the `cipher` there and then create a `get_secret` dummy function that will call the cipher.\n\n```python\nfrom v_crypt import Cipher\n\ncipher = Cipher(secrets_file=\"data/secrets.yaml\", filename_master_password=\"data/master.secret\")\n\ndef get_secret(key):\n return cipher.get_secret(key)\n```\n\nThen you can use it elsewhere with:\n\n```python\nimport utilities as u\n\nu.get_secret(\"secret\")\n```\n\n## Authors\n* [Arnau Villoro](https://villoro.com)\n\n## License\nThe content of this repository is licensed under a [MIT](https://opensource.org/licenses/MIT).\n\n## Nomenclature\nBranches and commits use some prefixes to keep everything better organized.\n\n### Branches\n* **f/:** features\n* **r/:** releases\n* **h/:** hotfixs\n\n### Commits\n* **[NEW]** new features\n* **[FIX]** fixes\n* **[REF]** refactors\n* **[PYL]** [pylint](https://www.pylint.org/) improvements\n* **[TST]** tests\n\n\n", "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/villoro/v-crypt", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "v-crypt", "package_url": "https://pypi.org/project/v-crypt/", "platform": "", "project_url": "https://pypi.org/project/v-crypt/", "project_urls": { "Homepage": "https://github.com/villoro/v-crypt" }, "release_url": "https://pypi.org/project/v-crypt/1.0.4/", "requires_dist": [ "cryptography (>=2.3)" ], "requires_python": "", "summary": "Utility to easily store password/secrets.", "version": "1.0.4" }, "last_serial": 5169445, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "cbd3825ff446431655c511ac85833b6e", "sha256": "0611445d721ded012166aa47bad4ea5036c9b12eeef07b532c809282929dd935" }, "downloads": -1, "filename": "v_crypt-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cbd3825ff446431655c511ac85833b6e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7261, "upload_time": "2019-03-26T16:39:06", "url": "https://files.pythonhosted.org/packages/ae/aa/146ad4ad68b7748c3fc568bdfb33d7eb23d47fd9d11dd20502a4f12afef8/v_crypt-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ace3df3b26338bd9fda506fe3304c7b1", "sha256": "951ce89ff9e56de579d5890290d93583a75524ccebc49261270ac449f6a7b055" }, "downloads": -1, "filename": "v_crypt-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ace3df3b26338bd9fda506fe3304c7b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6453, "upload_time": "2019-03-26T16:39:08", "url": "https://files.pythonhosted.org/packages/cd/40/4c7c4dde396e25dd060f0a0d7e0a3d31911ffc9636e7bf3ab917be09f9e4/v_crypt-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "56f43df637fee9f2948bc4bcb8f463b3", "sha256": "713b5ef5bf32d94b0624d823afc019d7d702e4918c006a473334e51cb61c5720" }, "downloads": -1, "filename": "v_crypt-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "56f43df637fee9f2948bc4bcb8f463b3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7255, "upload_time": "2019-03-27T08:51:07", "url": "https://files.pythonhosted.org/packages/b9/99/955b53c114477e0b98ea5ef85421cad4d041ac2f310ed0d3efba344bfaf1/v_crypt-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6acabceb1f62bf9744423e41551f7fd3", "sha256": "d182581cd808c492423df5f6e5e6bf76b3e9078f4005c60f0caaebb1a7cdae99" }, "downloads": -1, "filename": "v_crypt-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6acabceb1f62bf9744423e41551f7fd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6433, "upload_time": "2019-03-27T08:51:09", "url": "https://files.pythonhosted.org/packages/2f/a4/625cb058573e6fb92ec510126d09928c4a3aebf9ada6dea7a63628c43418/v_crypt-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "a9ca15d54f90c4a20a3b999e1cced91d", "sha256": "1f43d6f292a166138f97c195ad340d79676a1d72a4382cd308ad5414e09dfddc" }, "downloads": -1, "filename": "v_crypt-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a9ca15d54f90c4a20a3b999e1cced91d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7276, "upload_time": "2019-03-27T09:44:13", "url": "https://files.pythonhosted.org/packages/2e/d5/ee854463ec81db7d36cd59c86da80e6a2aff2a80d068e309bd59d77897e4/v_crypt-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ce693aff56d22a31c5e615665ee5312", "sha256": "b83235f9eba3e0eb00c9411f565b583f1026cdc647969aa750396fbabd25d17e" }, "downloads": -1, "filename": "v_crypt-1.0.2.tar.gz", "has_sig": false, "md5_digest": "6ce693aff56d22a31c5e615665ee5312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6501, "upload_time": "2019-03-27T09:44:16", "url": "https://files.pythonhosted.org/packages/6a/d2/fee7e10ace04643ae483d04428f46bc8ee7e7dc20fc97ae1373f6970e26d/v_crypt-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "87b91e6c62bf424ea211d64219f4733b", "sha256": "9fae7d1254e6dcc5e4231a9e77173d3312dc48bf6a8315769a5c8b1408029ddd" }, "downloads": -1, "filename": "v_crypt-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "87b91e6c62bf424ea211d64219f4733b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7275, "upload_time": "2019-03-28T09:11:22", "url": "https://files.pythonhosted.org/packages/a3/52/fb5a9b207ba7ae39a9c7ae7a97a6bdc629231a2a1e9b327256e67d10e9de/v_crypt-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61f550ca1c2738cd110ee5168715bdd4", "sha256": "0213442b64b802f4c78e6dc2096178ace23187735ce437d25d83c02a1595354e" }, "downloads": -1, "filename": "v_crypt-1.0.3.tar.gz", "has_sig": false, "md5_digest": "61f550ca1c2738cd110ee5168715bdd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6507, "upload_time": "2019-03-28T09:11:26", "url": "https://files.pythonhosted.org/packages/0a/c7/c0789dc488cb4d7514ec786be826578a13cfd1d84af2f566f7c0cb5ec050/v_crypt-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "1230bb4ff094f9fcf231b67bb8774a8e", "sha256": "c817c4f4b6ad43702a54626c511278c514f19a778be059c0bea607a9da5ca736" }, "downloads": -1, "filename": "v_crypt-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1230bb4ff094f9fcf231b67bb8774a8e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7289, "upload_time": "2019-04-21T09:34:08", "url": "https://files.pythonhosted.org/packages/c6/cc/8dc8a001d02bf1e785fcacbfca13378ebdda40c5764435a724ba49010adf/v_crypt-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e94a308505c27499c434097f9ad2b1a2", "sha256": "04a9d81db5903c98a6ac8d99d054a2c8b1349345a1d81b3fe5009ca51045ef04" }, "downloads": -1, "filename": "v_crypt-1.0.4.tar.gz", "has_sig": false, "md5_digest": "e94a308505c27499c434097f9ad2b1a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6505, "upload_time": "2019-04-21T09:34:12", "url": "https://files.pythonhosted.org/packages/0d/a4/69fe3c20dd2ac58c545992117591eced4e4dbb181070ebad9c7cf600c492/v_crypt-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1230bb4ff094f9fcf231b67bb8774a8e", "sha256": "c817c4f4b6ad43702a54626c511278c514f19a778be059c0bea607a9da5ca736" }, "downloads": -1, "filename": "v_crypt-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1230bb4ff094f9fcf231b67bb8774a8e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7289, "upload_time": "2019-04-21T09:34:08", "url": "https://files.pythonhosted.org/packages/c6/cc/8dc8a001d02bf1e785fcacbfca13378ebdda40c5764435a724ba49010adf/v_crypt-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e94a308505c27499c434097f9ad2b1a2", "sha256": "04a9d81db5903c98a6ac8d99d054a2c8b1349345a1d81b3fe5009ca51045ef04" }, "downloads": -1, "filename": "v_crypt-1.0.4.tar.gz", "has_sig": false, "md5_digest": "e94a308505c27499c434097f9ad2b1a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6505, "upload_time": "2019-04-21T09:34:12", "url": "https://files.pythonhosted.org/packages/0d/a4/69fe3c20dd2ac58c545992117591eced4e4dbb181070ebad9c7cf600c492/v_crypt-1.0.4.tar.gz" } ] }