Metadata-Version: 2.1
Name: python-simple-menu
Version: 1.0.10
Summary: A simple console menu
Home-page: https://github.com/ripvannwinkler/python-simple-menu
Author: Chris Vann
Author-email: chrisvann01@gmail.com
Keywords: python,menu,simple menu,console menu
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md

# Simple Menu

A lightweight console menu package for python applications. No frills, no fuss.

## Installing

To install to your project, run the following command:

```commandline
pip install simple_menu
```

## How to Use

```python
def main():
	# Create a main menu
	m = Menu(prompt="Main Menu")
	m.items.append(FunctionItem(label="Item 1", function=lambda: print("Item 1")))

	# Create a sub-menu
	m2 = Menu(parent=m, prompt="Sub Menu 1")
	m2.items.append(FunctionItem(label="Item 2", function=lambda: print("Item 2")))

	# Add the sub-menu to the main menu
	m.items.append(MenuItem(label="Sub Menu 1", menu=m2))

	# Run the menu
	m.run()


if __name__ == "__main__":
	main()

```

The menu will run until the user chooses the Quit item, which will exit the application.
When entering a sub-menu, an additional "go back" option is added which will return the
user to the parent menu. The various prompts can be customized in the Menu()
constructor.
