Skip to content
/ mendi Public

A python library for building menu-driven CLI applications.

License

Notifications You must be signed in to change notification settings

aahnik/mendi

Repository files navigation

mendi

Code Quality Tests codecov PyPI - Python Version

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.