Name | rich-menu JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-06-23 03:11:29 |
maintainer | None |
docs_url | None |
author | gbPagano |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Rich Menu
Rich menu is a library that allows the quick and simple creation of cli menus, using [Rich](https://github.com/Textualize/rich) as a backend.
## Installation
Installation is very simple, just run the following command in the terminal:
```bash
pip install rich-menu
```
## Basic Usage
```python
from rich_menu import Menu
menu = Menu(
"Option 1",
"Option 2",
"Option 3",
"Exit",
)
match menu.ask():
case "Option 1":
print("first option selected")
case "Option 2":
print("second option selected")
case "Option 3":
print("third option selected")
case "Exit":
exit()
```
```python
from rich_menu import Menu
menu = Menu(
"X",
"O",
color="blue",
rule_title="Tic Tac Toe",
align="center",
panel_title="Choose your icon",
selection_char="->",
)
selected = menu.ask(screen=False)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "rich-menu",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "gbPagano",
"author_email": "guilhermebpagano@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1e/ef/21a74b519e413744bc3cc47b593b7c7b2986eb04bab0583380a3488e94ea/rich_menu-0.2.0.tar.gz",
"platform": null,
"description": "# Rich Menu\n\nRich menu is a library that allows the quick and simple creation of cli menus, using [Rich](https://github.com/Textualize/rich) as a backend.\n\n\n## Installation\n\nInstallation is very simple, just run the following command in the terminal:\n\n```bash\npip install rich-menu\n```\n\n\n## Basic Usage\n\n```python\nfrom rich_menu import Menu\n\nmenu = Menu(\n \"Option 1\",\n \"Option 2\",\n \"Option 3\",\n \"Exit\",\n)\nmatch menu.ask():\n case \"Option 1\":\n print(\"first option selected\")\n case \"Option 2\":\n print(\"second option selected\")\n case \"Option 3\":\n print(\"third option selected\")\n case \"Exit\":\n exit()\n\n```\n\n```python\nfrom rich_menu import Menu\n\nmenu = Menu(\n \"X\",\n \"O\",\n color=\"blue\",\n rule_title=\"Tic Tac Toe\",\n align=\"center\",\n panel_title=\"Choose your icon\",\n selection_char=\"->\",\n)\nselected = menu.ask(screen=False)\n```\n\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.2.0",
"project_urls": {
"Code": "https://github.com/gbPagano/rich_menu"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f6f94762a4c36e60af99faffe05e636a8641c3789cc4c11ea07a17872d24b19a",
"md5": "ac3f69211cbb202e19ebfbf1ab688068",
"sha256": "40ec6340fe671695b40b9c2fdfe2f9f49a8c3b17f07a5e4981556d8bfa93aaea"
},
"downloads": -1,
"filename": "rich_menu-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac3f69211cbb202e19ebfbf1ab688068",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 3581,
"upload_time": "2024-06-23T03:11:27",
"upload_time_iso_8601": "2024-06-23T03:11:27.475093Z",
"url": "https://files.pythonhosted.org/packages/f6/f9/4762a4c36e60af99faffe05e636a8641c3789cc4c11ea07a17872d24b19a/rich_menu-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1eef21a74b519e413744bc3cc47b593b7c7b2986eb04bab0583380a3488e94ea",
"md5": "535efacbdea35289ebd1fa6b863c4a8a",
"sha256": "c341d53d267aba0a67ae9e0f394205fbeb889f06fff7d8d08a928f0475f85f73"
},
"downloads": -1,
"filename": "rich_menu-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "535efacbdea35289ebd1fa6b863c4a8a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 3123,
"upload_time": "2024-06-23T03:11:29",
"upload_time_iso_8601": "2024-06-23T03:11:29.120690Z",
"url": "https://files.pythonhosted.org/packages/1e/ef/21a74b519e413744bc3cc47b593b7c7b2986eb04bab0583380a3488e94ea/rich_menu-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-23 03:11:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gbPagano",
"github_project": "rich_menu",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "rich-menu"
}