{ "info": { "author": "Chris Norman", "author_email": "chris.norman2@googlemail.com", "bugtrack_url": null, "classifiers": [], "description": "# prompt-toolkit-menu\nVery simple menu system for prompt-toolkit-menu\n\n## Usage\nCreate a menu with or without a title:\n\n```\nfrom prompt_toolkit_menu import Menu\n\nm = Menu('Welcome')\n```\n\nThen add items:\n\n```\nfrom prompt_toolkit.widgets import Checkbox, TextArea\nusername = TextArea(multiline=False, prompt='Username: ')\npassword = TextArea(multiline=False, password=True, prompt='Password: ')\nm.add_item(username)\nm.add_item(password)\nremember = Checkbox(text='Remember Credentials')\nremember.checked = False\nm.add_item(remember)\n\n# Add buttons with a decorator:\n@m.add_button()\ndef connect():\n \"\"\"Create a sub menu of possible hosts.\"\"\"\n m2 = Menu('Connect')\n for host in ('microsoft.com', 'github.com', 'google.com'):\n m2.add_button(\n host\n )(lambda h=host: print('Connecting to %s...' % h))\n\n # Add a way back to the previous menu.\n @m2.add_button('Back')\n def go_back():\n \"\"\"Return to the previous menu.\"\"\"\n # Show the first menu.\n m.set_layout()\n\n # Override the current app layout with the layout from the new menu.\n m2.set_layout()\n\n# Add a separator. Pass an argument to change the text.\nm.add_separator()\n\n# One last button.\n@m.add_button('Exit')\ndef do_exit():\n \"\"\"Exit the app.\"\"\"\n app.exit()\n```\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/chrisnorman7/prompt-toolkit-menu", "keywords": "", "license": "MPL-2", "maintainer": "", "maintainer_email": "", "name": "prompt-toolkit-menu", "package_url": "https://pypi.org/project/prompt-toolkit-menu/", "platform": "", "project_url": "https://pypi.org/project/prompt-toolkit-menu/", "project_urls": { "Homepage": "https://github.com/chrisnorman7/prompt-toolkit-menu" }, "release_url": "https://pypi.org/project/prompt-toolkit-menu/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Simple menus for use with prompt_toolkit", "version": "0.0.1" }, "last_serial": 5971186, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b406fc8e62db580b248043f9175f46f0", "sha256": "0b7216475e2443a96612e4287bcfd392cd76996e430ec5f955bc7c91ce030f45" }, "downloads": -1, "filename": "prompt_toolkit_menu-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b406fc8e62db580b248043f9175f46f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9280, "upload_time": "2019-10-14T12:05:40", "url": "https://files.pythonhosted.org/packages/8b/0e/0f022bb82aa76cd1b1da370d19914b71e52d5c7fa53622ad50d1682c3f0e/prompt_toolkit_menu-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b325d6c34b3603ab2029113cc701c503", "sha256": "9fdcb3b12ad55ff7f2a972e8420d73595f0a569aeb20a5004a8903b0dc821229" }, "downloads": -1, "filename": "prompt_toolkit_menu-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b325d6c34b3603ab2029113cc701c503", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8637, "upload_time": "2019-10-14T12:05:43", "url": "https://files.pythonhosted.org/packages/9c/46/13b51d607892dd1954309e2f67c30b262756acbf7d8978c799684137ed20/prompt_toolkit_menu-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b406fc8e62db580b248043f9175f46f0", "sha256": "0b7216475e2443a96612e4287bcfd392cd76996e430ec5f955bc7c91ce030f45" }, "downloads": -1, "filename": "prompt_toolkit_menu-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b406fc8e62db580b248043f9175f46f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9280, "upload_time": "2019-10-14T12:05:40", "url": "https://files.pythonhosted.org/packages/8b/0e/0f022bb82aa76cd1b1da370d19914b71e52d5c7fa53622ad50d1682c3f0e/prompt_toolkit_menu-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b325d6c34b3603ab2029113cc701c503", "sha256": "9fdcb3b12ad55ff7f2a972e8420d73595f0a569aeb20a5004a8903b0dc821229" }, "downloads": -1, "filename": "prompt_toolkit_menu-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b325d6c34b3603ab2029113cc701c503", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8637, "upload_time": "2019-10-14T12:05:43", "url": "https://files.pythonhosted.org/packages/9c/46/13b51d607892dd1954309e2f67c30b262756acbf7d8978c799684137ed20/prompt_toolkit_menu-0.0.1.tar.gz" } ] }