Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baggerfast/pyconsolemenu
A simple Python menu in the terminal using curses. Ideal for people who want to quickly make a menu without writing their own complicated crutches. Includes: SelectorMenu, MultipleSelectorMenu, FunctionalMenu.
https://github.com/baggerfast/pyconsolemenu
console-application console-library console-menu curses-library library menu menusystem pip python python-menu
Last synced: 8 days ago
JSON representation
A simple Python menu in the terminal using curses. Ideal for people who want to quickly make a menu without writing their own complicated crutches. Includes: SelectorMenu, MultipleSelectorMenu, FunctionalMenu.
- Host: GitHub
- URL: https://github.com/baggerfast/pyconsolemenu
- Owner: BaggerFast
- License: mit
- Created: 2022-07-05T13:52:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T05:53:25.000Z (almost 2 years ago)
- Last Synced: 2024-12-14T09:48:32.951Z (11 days ago)
- Topics: console-application, console-library, console-menu, curses-library, library, menu, menusystem, pip, python, python-menu
- Language: Python
- Homepage: https://www.youtube.com/watch?v=jxq9UQrVNq4&t=1s
- Size: 1.36 MB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PyConsoleMenu
[![CodeFactor](https://www.codefactor.io/repository/github/baggerfast/pyconsolemenu/badge)](https://www.codefactor.io/repository/github/baggerfast/pyconsolemenu)
[![BUILD-STATUS](https://github.com/BaggerFast/PyConsoleMenu/workflows/CI/badge.svg)](https://github.com/BaggerFast/PyConsoleMenu/actions)A simple Python menu in the terminal using curses.
Ideal for people who want to quickly make a menu without writing their own complicated crutches.
Includes: SelectorMenu, MultipleSelectorMenu, FunctionalMenu.## Preview
![Selector](https://github.com/BaggerFast/PyConsoleMenu/blob/main/assets/selector.gif?raw=true)[See other](https://github.com/BaggerFast/PyConsoleMenu/tree/main/assets)
## Installation ๐พ
- using pip
```
$ pip install PyConsoleMenu
```- using GitHub *(ััะตะฑัะตััั [git](https://git-scm.com/downloads))*
```
$ git clone https://github.com/BaggerFast/PyConsoleMenu
$ cd PyConsoleMenu
$ pip install -r requirements.txt
```## Additionally โจ๏ธ
- Docs in code
- Type hints## Usage example ๐จโ๐ป
```py
from PyConsoleMenu import MultiSelectorMenu, FunctionalOption, SelectorMenu, FunctionalMenudef multi_selector():
menu = MultiSelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='MultiSelector', count=3)
ans = menu.input()
print(ans)def selector():
menu = SelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='Selector')
ans = menu.input()
print(ans)def functional():
data = [
FunctionalOption('Cheburashka', lambda: print('I am a Parrot')),
FunctionalOption('Parrot', lambda: print('I am a Cheburashka')),
]
menu = FunctionalMenu(data, title='Functional')
ans = menu.input()
ans()
```
*[See more examples](https://github.com/BaggerFast/PyConsoleMenu/tree/main/examples)***Was written in these videos on YouTube ๐** \
[Video#1](https://www.youtube.com/watch?v=wgK90PIzlng&t=118s) \
[Stream#1](https://www.youtube.com/watch?v=7eHcjkM-mTs&t=6046s) \
[Stream#2](https://www.youtube.com/watch?v=ppZoCcmPhpc&t=2941s)