Skip to main content

A python library for building menu-driven CLI applications.

Project description

mendi

Code Quality Tests codecov

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

mendi-0.1.0.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

mendi-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page