A python library for building menu-driven CLI applications.
Project description
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
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.from mendi import drive_menu drive_menu([func1,func2])
See example.py
for a full example.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mendi-0.1.0.tar.gz
.
File metadata
- Download URL: mendi-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.8.0-53-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2bc15f64562d663ea3e805f015cd93c34f42ea88727935461c71b88119f0ddf |
|
MD5 | a36fe85ac9c97abbce4d5181189680d6 |
|
BLAKE2b-256 | 38706eceec76aad821040efed18b1120b23895f397a9b2f39be8622bbd75d0c9 |
File details
Details for the file mendi-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mendi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.8.0-53-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2885091c2b6d4227f39510ee7d496022d510b99bb764a641d13ca3c46d12224 |
|
MD5 | fa3beafc4886625277ffab879b564d41 |
|
BLAKE2b-256 | c827b483c635cc27915c5ba6be4a273e27dd6eca598c7467f9a39c872560e1d8 |