{ "info": { "author": "Ahmed Youssef", "author_email": "xmonader@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "# secretconf\n\n![[https://pypi.python.org/pypi/secretconf](pypi)](https://img.shields.io/pypi/v/secretconf.svg)\n![[https://travis-ci.org/xmonader/secretconf]](https://travis-ci.org/xmonader/secretconf.png)\n\n![[https://codecov.io/gh/xmonader/secretconf]](https://codecov.io/gh/xmonader/secretconf/branch/master/graph/badge.svg)\n\n\nManage your secret configurations easily\n\n# Installation\n`pip3 install secretconf --user`\n\n\n# Usage\nsecretconf is a library to manage (encrypt/decrypt) your credentials on demand using public key encryption.\n\n## Hush\nhush is a commandline utility installed with secretconf to make your life easier to store and update credentials\n\n```bash\nhush --section twittermain --fields 'user,__token' --privatekey ~/.ssh/id_rsa \n```\n\n```bash\n\nhush --help\nUsage: hush [OPTIONS]\n\nOptions:\n --section TEXT Section (Appname)\n --privatekey TEXT Privatekey path\n --configpath TEXT Secret configuration path\n --fields TEXT quoted comma separated fields; secret fields are prefixed with __\n --help Show this message and exit.\n\n```\n\n### Data storage\nYou can configure where to save the data using `--configpath` which is set to `/tmp/secrets.conf` by default. \n```toml\n[twittermain]\nuser = ahmed\n__token = eYCWre9l7IauoHs6K3D5J2wkgnQQBtFV4CoZE3W4tpbxa7Z7Qt+c/LnQhSI=\n\n```\n> Please notice that you can't use multiple keys on the same `configpath` file\n\n# API usage \nsecretconf [documentation](https://xmonader.github.io/secretconf/api/secretconf/)\n\n## make_config\n```python\ndef test_make_config_creates_file_with_encrypted_data():\n make_config(APPNAME, {'user': USER, '__password': PASSWORD},\n config_path=TEST_CONFIG_PATH, private_key=hashedsk)\n\n assert os.path.exists(TEST_CONFIG_PATH)\n with open(TEST_CONFIG_PATH, 'r') as f:\n content = f.read()\n assert \"user\" in content\n assert USER in content\n assert \"__password\" in content\n assert PASSWORD not in content\n```\n\n\n## read_config\n\n```python\n conf = read_config(APPNAME, config_path=TEST_CONFIG_PATH,\n private_key=hashedsk)\n assert APPNAME in conf\n assert 'user' in conf[APPNAME]\n assert '__password' in conf[APPNAME]\n assert conf[APPNAME]['user'] == USER\n assert conf[APPNAME]['__password'] == PASSWORD\n```\n\n# Testing\nsecretconf tests exists in [tests](./tests) directory \n- basic tests `test_basic.py`: encryption/decryption and usage of `make_config` and `read_config`\n- property based tests `test_properties.py`\n\nYou can use `pytest tests` or just `tox` make sure to `install requirements-test.txt` or `make test`\n\n\n# Generating Docs\n`make gendocs`\n\n# Requirements\n\n- setuptools==38.5.0\n- click==6.7\n- PyNaCl==1.2.1\n- npyscreen==4.10.5\n\n# License\nSoftware is provided as is under BSD 3-Clause License\n\n\n# Authors\n\n`secretconf` was written by `Ahmed Youssef `_.\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/xmonader/secretconf", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "secretconf", "package_url": "https://pypi.org/project/secretconf/", "platform": "", "project_url": "https://pypi.org/project/secretconf/", "project_urls": { "Homepage": "https://github.com/xmonader/secretconf" }, "release_url": "https://pypi.org/project/secretconf/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "manage your secrets and configurations easily", "version": "0.1.2" }, "last_serial": 5555011, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "265936b32d1dfdaea160a96479af4781", "sha256": "cc7530d8d7be7681f6136232322148fecd1f2263bb65ab5c19a3e0eceb004a4c" }, "downloads": -1, "filename": "secretconf-0.1.0.tar.gz", "has_sig": false, "md5_digest": "265936b32d1dfdaea160a96479af4781", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4298, "upload_time": "2018-03-27T11:04:03", "url": "https://files.pythonhosted.org/packages/aa/17/8891bcacad55c88d35c6b178e300f84c045cc8236852c1d25c53e730fccf/secretconf-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3ce4eb48996eee5050ef9221637a9d49", "sha256": "3965c725859755f94fa46958e47791094cae0e2741db3903f60af6742f9cb925" }, "downloads": -1, "filename": "secretconf-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3ce4eb48996eee5050ef9221637a9d49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4564, "upload_time": "2019-05-14T13:02:18", "url": "https://files.pythonhosted.org/packages/da/d1/2b7affd59399a5faed255454cdbc5b17c4856fd3b05877014e85a7018593/secretconf-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b1641f45e35cb1e6db04dca116415e8f", "sha256": "e1b556b3de83852b9ae97a85b0041987968689efd6673f2cfbb5d5808c968e02" }, "downloads": -1, "filename": "secretconf-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b1641f45e35cb1e6db04dca116415e8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7420, "upload_time": "2019-07-19T07:52:25", "url": "https://files.pythonhosted.org/packages/c1/fd/f08ccc9792e027a7b2d1b376568310bfd487d260123ca1bd628517029ecd/secretconf-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c61d00accf204a0fe1e4bbcafbe3b56", "sha256": "89aa68c7bcd995aad277a0dadaaf9f92c2e22d56a17bc4f923a01077e097eb47" }, "downloads": -1, "filename": "secretconf-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0c61d00accf204a0fe1e4bbcafbe3b56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5142, "upload_time": "2019-07-19T07:52:26", "url": "https://files.pythonhosted.org/packages/47/f9/1be6f60067709d34af73e9177f9abea227ec76873d8e7dcd50ec8bc11e69/secretconf-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1641f45e35cb1e6db04dca116415e8f", "sha256": "e1b556b3de83852b9ae97a85b0041987968689efd6673f2cfbb5d5808c968e02" }, "downloads": -1, "filename": "secretconf-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b1641f45e35cb1e6db04dca116415e8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7420, "upload_time": "2019-07-19T07:52:25", "url": "https://files.pythonhosted.org/packages/c1/fd/f08ccc9792e027a7b2d1b376568310bfd487d260123ca1bd628517029ecd/secretconf-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c61d00accf204a0fe1e4bbcafbe3b56", "sha256": "89aa68c7bcd995aad277a0dadaaf9f92c2e22d56a17bc4f923a01077e097eb47" }, "downloads": -1, "filename": "secretconf-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0c61d00accf204a0fe1e4bbcafbe3b56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5142, "upload_time": "2019-07-19T07:52:26", "url": "https://files.pythonhosted.org/packages/47/f9/1be6f60067709d34af73e9177f9abea227ec76873d8e7dcd50ec8bc11e69/secretconf-0.1.2.tar.gz" } ] }