{ "info": { "author": "Greg Fitch", "author_email": "greg@openstax.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Testing" ], "description": "==================\npytest-securestore\n==================\n\n.. image:: https://img.shields.io/pypi/v/pytest-securestore.svg\n :target: https://pypi.org/project/pytest-securestore\n :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-securestore.svg\n :target: https://pypi.org/project/pytest-securestore\n :alt: Python versions\n\n.. image:: https://travis-ci.org/gregfitch/pytest-securestore.svg?branch=master\n :target: https://travis-ci.org/gregfitch/pytest-securestore\n :alt: See Build Status on Travis CI\n\nAn encrypted password store for use within pytest cases\n\n----\n\nThis `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `cookiecutter-pytest-plugin`_ template.\n\n\nFeatures\n--------\n\nProvide a way to include encrypted data in a test repo so project team members may share test account data (logins, password, keys) while only having to share the decryption password and store filename outside of the repository.\n\n\nRequirements\n------------\n\nSecureStore makes use of PyAesCrypt by Marco Bellaccini:\n\"pyAesCrypt is a Python 3 file-encryption module and script that uses AES256-CBC to encrypt/decrypt files and binary streams.\"\n\nFiles must be formatted as YAML data (`YAML Reference`_) and will be loaded into a Python dictionary.\n\n\nInstallation\n------------\n\nYou can install \"pytest-securestore\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-securestore\n\n\nUsage\n-----\n\nGeneric YAML layout:\n\n.. code-block:: yaml\n\n ---\n # a comment\n a_general_user:\n username: the_username\n password: a_password\n usertype: some_defined_type\n ...\n\nEncrypt the YAML file (`file encryption`_):\n\n.. code-block:: yaml\n\n import os\n import pyAesCrypt\n\n buffer_size = 64 * 1024 # 64K\n filename = os.getenv('SECURE_STORE_FILE')\n password = os.getenv('SECURE_STORE_PASSWORD')\n pyAesCrypt.encryptFile(\"/path/to/yaml/file\", filename, password, buffer_size)\n\nInclude the encrypted file in the repository.\n\nWithin a test:\n\n.. code-block:: yaml\n\n def test_get_store_values(store):\n # one way to get the value\n user = store.get('a_general_user')\n username = user['username']\n # or another\n username = store.get('a_general_user').get('username')\n # or even another\n password = store.get('a_general_user')['password']\n # or\n user_type = store['a_general_user']['usertype']\n # ...\n some_site.log_in(username, password, user_type)\n\nAnd to kick it off:\n\nCLI with environment variables:\n\n.. code-block:: bash\n\n $ pytest --secure-store-filename=$SECURE_STORE_FILE --secure-store-password=$SECURE_STORE_PASSWORD\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-securestore\" is free and open source software\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/gregfitch/pytest-securestore/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`PyPI`: https://pypi.org/project\n.. _`YAML Reference`: https://yaml.org/refcard.html\n.. _`file encryption`: https://pypi.org/project/pyAesCrypt/#module-usage-example\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gregfitch/pytest-securestore", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-securestore", "package_url": "https://pypi.org/project/pytest-securestore/", "platform": "", "project_url": "https://pypi.org/project/pytest-securestore/", "project_urls": { "Homepage": "https://github.com/gregfitch/pytest-securestore" }, "release_url": "https://pypi.org/project/pytest-securestore/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "An encrypted password store for use within pytest cases", "version": "0.1.3" }, "last_serial": 5421185, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "985753ab79fae8c8933325d6599d67b3", "sha256": "ff0d1c62e6934a2c438e01e13a26511f5cf83e107d955ebae8d6ce13c558366c" }, "downloads": -1, "filename": "pytest-securestore-0.1.0.tar.gz", "has_sig": false, "md5_digest": "985753ab79fae8c8933325d6599d67b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4656, "upload_time": "2019-02-25T21:05:57", "url": "https://files.pythonhosted.org/packages/c4/ad/e8edddc5f7084eb5d8726fa43deb711ecbcc0a6ad326c7f717d1c7e57179/pytest-securestore-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6dce5e130e145f50287956470b15513a", "sha256": "522dd0b68690d9d03bfecd40cf1d86360e9ef3902f7e050f0839d2450c572fb0" }, "downloads": -1, "filename": "pytest-securestore-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6dce5e130e145f50287956470b15513a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4667, "upload_time": "2019-02-25T22:41:05", "url": "https://files.pythonhosted.org/packages/50/fe/9f5b27c5a2a4fa327e78d29d0b604e9043979faa7d88104eaed4c0f33dde/pytest-securestore-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "03b0bdb7f115ea4ced0c2c5139c12714", "sha256": "9f50f93e0c3cd72bdd4959672bbde461c9745eb3e47098c6d3d605756e7a558e" }, "downloads": -1, "filename": "pytest-securestore-0.1.2.tar.gz", "has_sig": false, "md5_digest": "03b0bdb7f115ea4ced0c2c5139c12714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4645, "upload_time": "2019-02-26T16:02:42", "url": "https://files.pythonhosted.org/packages/8c/e5/57599f2da76dd829d56cc3e456914fa3192cdc2cdba6e2afa71f7401704c/pytest-securestore-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c74b161ded543b5c562bd4b14f5939ee", "sha256": "80b245eddd8eb321813172a5ab8142bce0de4e2dfe63bf49f22cedc72e4d3368" }, "downloads": -1, "filename": "pytest-securestore-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c74b161ded543b5c562bd4b14f5939ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4623, "upload_time": "2019-06-19T16:23:42", "url": "https://files.pythonhosted.org/packages/be/fe/a117ccacb06f195afe18a67c129281bb511423d8c8a7f949315389e054d7/pytest-securestore-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c74b161ded543b5c562bd4b14f5939ee", "sha256": "80b245eddd8eb321813172a5ab8142bce0de4e2dfe63bf49f22cedc72e4d3368" }, "downloads": -1, "filename": "pytest-securestore-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c74b161ded543b5c562bd4b14f5939ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4623, "upload_time": "2019-06-19T16:23:42", "url": "https://files.pythonhosted.org/packages/be/fe/a117ccacb06f195afe18a67c129281bb511423d8c8a7f949315389e054d7/pytest-securestore-0.1.3.tar.gz" } ] }