{ "info": { "author": "laharah", "author_email": "laharah22+pyn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Security", "Topic :: Software Development :: User Interfaces" ], "description": "# PynEntry\n### A pythonic wrapper for pinentry\n\nWritten mostly to practice metaprogramming\n\ncredit to [mijikai](https://github.com/mijikai/pynentry) for a working example\n\n***Requires pinentry to be installed***\n\n#### convienience methods:\n\n* to quickly and simply get a password/pin from a user:\n\n`get_pin(description=None, prompt=None, timeout=0, display=None, global_grab=True)`\n\n* to show and get a confirmation from a user:\n\n`get_confirm(description=None, timeout=0, display=None, global_grab=True)`\n\n* to show a message to a user:\n\n`show_message(description=None, timeout=0, display=None, global_grab=True)`\n\n#### PynEntry class\nThe above methods instance and configure a PynEntry instance wich can be called and configured manually\nvia attributes\n\n\nthe PynEntry class supports the following attributes:\n\n* `description`: Sets the descriptive text to display\n* `prompt`: Sets the text just before the passphrase entry (ex: \"PASS:\")\n* `title`: Sets the window title\n* `ok_text`: Sets the text shown in the \"OK\" button\n* `cancel_text`: Sets the text shown in the \"Cancel\" button\n* `error_text`: Sets the text in case of error before reprompt (Cleared after every `get_pin()` call)\n* `tty_name`: Chose the tty to use (set automatically)\n* `tty_type`: Change the tty type to use.\n* `locale`: Sets the locale to use (set automatically to current os locale)\n\n***NOTE: The PynEntry class uses the $PATH variable to find the pinentry executable, you can specify the location of the\nexecutable manually when you initialize like so: `PynEntry(executable='/path/to/pinentry')`***\n\nPynEntry is best used as a context manager to automatically kill the pinentry process when you are done.\n\n#### Example:\n```python\nimport pynentry\npynentry.show_message('Hello there!')\n\nwith pynentry.PynEntry() as p:\n p.description = 'Enter a password.\\n Choose Wisely!'\n p.prompt = 'PASS>'\n try:\n passwd = p.get_pin()\n except pynentry.PinEntryCancelled:\n print('Cancelled?! Goodbye.')\n exit()\n p.ok_text = 'yep!'\n p.cancel_text = 'nope!'\n p.description = f'CAN YOU CONFIRM YOUR SUPER SECRET PASSWORD IS {passwd}?'\n if p.get_confirm():\n print(f'password {passwd} saved!')\n else:\n print(f'Too bad, so sad')\n````\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/Laharah/pynentry", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pynentry", "package_url": "https://pypi.org/project/pynentry/", "platform": "", "project_url": "https://pypi.org/project/pynentry/", "project_urls": { "Homepage": "https://github.com/Laharah/pynentry" }, "release_url": "https://pypi.org/project/pynentry/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "A pythonic wrapper around pinentry for secure password input", "version": "0.1.1" }, "last_serial": 5932826, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "55b9352ee67258aeec11b1fe0f1f2c74", "sha256": "91bcb6de063db3141cce243e4eb953fda6b27111a4a814740896e7a2a3635dfb" }, "downloads": -1, "filename": "pynentry-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "55b9352ee67258aeec11b1fe0f1f2c74", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5153, "upload_time": "2019-09-29T21:04:39", "url": "https://files.pythonhosted.org/packages/f3/1d/1bd67e32a914d6ba109936a56a3d18668bd62e86d02456511698565a4930/pynentry-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7fe2cb816e1e989273b71c185f9e4699", "sha256": "f40ba03cf57820ddeb9d53edd9ce3e696f7d069eafcc5692093db94e67db91c8" }, "downloads": -1, "filename": "pynentry-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7fe2cb816e1e989273b71c185f9e4699", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4149, "upload_time": "2019-09-29T21:04:41", "url": "https://files.pythonhosted.org/packages/8e/56/965c337b91ab7b4daae083695ef3e44690bd327d0ed9529fb4bc3f4697e0/pynentry-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "941b1069f1a9babb337ec95c6e1ad451", "sha256": "5f703b8b2b41e7bb092fb681d77beaa2dd79e65c6b0f26898a4113c951ae1d60" }, "downloads": -1, "filename": "pynentry-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "941b1069f1a9babb337ec95c6e1ad451", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5160, "upload_time": "2019-10-05T18:43:13", "url": "https://files.pythonhosted.org/packages/66/50/4862b90fdd977910ce4c5e210f9b70eb2227d503e962f83982c3f20582da/pynentry-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6020b1172052b8815fc6ca23edf2bce5", "sha256": "da3e8413ba063d940e55e7d430cae2c30cd345d369f605e00cb99801740abe75" }, "downloads": -1, "filename": "pynentry-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6020b1172052b8815fc6ca23edf2bce5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4152, "upload_time": "2019-10-05T18:43:16", "url": "https://files.pythonhosted.org/packages/26/19/ed4e3e29cb2d82af10e4befc9ed992a92305900a725064d3294f0206ed86/pynentry-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "941b1069f1a9babb337ec95c6e1ad451", "sha256": "5f703b8b2b41e7bb092fb681d77beaa2dd79e65c6b0f26898a4113c951ae1d60" }, "downloads": -1, "filename": "pynentry-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "941b1069f1a9babb337ec95c6e1ad451", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5160, "upload_time": "2019-10-05T18:43:13", "url": "https://files.pythonhosted.org/packages/66/50/4862b90fdd977910ce4c5e210f9b70eb2227d503e962f83982c3f20582da/pynentry-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6020b1172052b8815fc6ca23edf2bce5", "sha256": "da3e8413ba063d940e55e7d430cae2c30cd345d369f605e00cb99801740abe75" }, "downloads": -1, "filename": "pynentry-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6020b1172052b8815fc6ca23edf2bce5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4152, "upload_time": "2019-10-05T18:43:16", "url": "https://files.pythonhosted.org/packages/26/19/ed4e3e29cb2d82af10e4befc9ed992a92305900a725064d3294f0206ed86/pynentry-0.1.1.tar.gz" } ] }