https://github.com/aahnik/mendi
A python library for building menu-driven CLI applications.
https://github.com/aahnik/mendi
aahnik cli menudriven menudrivenprogram poetry python-library python3 tox
Last synced: 3 months ago
JSON representation
A python library for building menu-driven CLI applications.
- Host: GitHub
- URL: https://github.com/aahnik/mendi
- Owner: aahnik
- License: mit
- Created: 2021-05-21T06:21:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-07T15:46:20.000Z (almost 4 years ago)
- Last Synced: 2025-02-01T09:51:19.284Z (3 months ago)
- Topics: aahnik, cli, menudriven, menudrivenprogram, poetry, python-library, python3, tox
- Language: Python
- Homepage: https://pypi.org/project/mendi
- Size: 29.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# mendi
[](https://github.com/aahnik/mendi/actions/workflows/quality.yml)
[](https://github.com/aahnik/mendi/actions/workflows/test.yml)
[](https://codecov.io/gh/aahnik/mendi)
A python library for building menu-driven CLI applications.
> A menu-driven program is one, in which the user is provided a list of choices.
> A particular action is done when the user chooses a valid option.
> There is also an exit option, to break out of the loop.
> Error message is shown on selecting a wrong choice.## Installation
```shell
pip install mendi
```## Usage
This is a simple snippet showing you the use of `mendi`
- Write functions with docstrings.
The first line of the docstring is the description of the choice.- Call `drive_menu` with the list of functions.
```python
from mendi import drive_menu
drive_menu([func1,func2])
```See [`example.py`](example.py) for a full example.