Skip to main content

A simple but cool menu-creation package

Project description

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

For an example of the final output check

here

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('Subitle')

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

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

better_menu-1.0.13.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

better_menu-1.0.13-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file better_menu-1.0.13.tar.gz.

File metadata

  • Download URL: better_menu-1.0.13.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for better_menu-1.0.13.tar.gz
Algorithm Hash digest
SHA256 e881052da72b12c98c5e119b604dc622193622747e3fb94f19989b12bb1ea6f7
MD5 1ae358a8125515bb9fa0d14bf23336fd
BLAKE2b-256 47103399eba20e871c82eeea1eeb083b698582c934adb07d801bfedb6c0a3f75

See more details on using hashes here.

File details

Details for the file better_menu-1.0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for better_menu-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 c9cf8a410f39c0da5bbc0e3ecd9fda4d39947b854b65deb8af1f6392621c25e9
MD5 655c591bd3d922f624407094348dd84f
BLAKE2b-256 e13afd498124ddb226422626c92509fc68dc3b472385d96ce0640e53172461d0

See more details on using hashes here.

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