Metadata-Version: 2.1
Name: python-simple-menu
Version: 1.1.3
Summary: Yet another simple console menu
License: MIT
Author: Chris Vann
Author-email: chrisvann01@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown

# 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.

