Skip to content

better_menu is a Python library for creating simple but cool menu(s) very fastly.

Notifications You must be signed in to change notification settings

C-JeanDev/better_menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better Menu

better_menu is a Python library for creating simple but cool menu(s) very fastly.

Installation

Use the package manager pip to install Pydeas

pip install better_menu

Get Started

Make sure you've installed getch via pip

For an example of the final output check

img

The menu constructor

the Menu constructor takes in 1 argument (and other optionals 2) : a menu dictionary that has the voice and a function that will be executed if the voice is chosen

m = {
  '1. Insert User': insert_user,
  '2. Exit': exit
}

Now pass the menu to the constructor

from better_menu.menu import Menu

m = {
  '1. Insert User': insert_user,
  '2. Exit': exit
}

menu = Menu(m)
menu.init()

Title and Subtitle

You can add a title and a subtitle that will be printed within the menu

from better_menu.menu import Menu

m = {
  '1. Insert User': insert_user,
  '2. Exit': exit
}

menu = Menu(m)
menu.title('Title')
menu.subtitle('Subtitle')
menu.init()

Option Argument (indicator, color)

Indicator (ind): indicate the indicator of the selcted voice

Color (color): indicate the color of the title or subtitle or of the selcted voice if passed to the menu constructor

from better_menu.menu import Menu

m = {
  '1. Insert User': insert_user,
  '2. Exit': exit
}
#set the indicator of the selcted voice to '>' and the color of the selected voice to red
menu = Menu(m, ind='>', color='red') 

# set the color of the title to 'black'
menu.title('Title', color='black') 

# set the color of the subtitle to 'blue'
menu.subtitle('Subitle', color='blue')

menu.init()

Better Menu v1.0.13

About

better_menu is a Python library for creating simple but cool menu(s) very fastly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages