Skip to main content

A lightweight Python library useful for creating powerful yet simple console-based user interfaces

Project description

Welcome to gb-menu 👋

Python Versions Release Downloads Weekly Commits

A lightweight Python library useful for creating powerful yet simple console-based user interfaces

Install

pip install gb-menu

Usage

from gb_menu import menu, choice, action

main_menu = menu.Menu()
cont_action = action.Action(function=type(None))
cont_choice = choice.Choice(key='c', text='Continue', action=cont_action)
main_menu.add_choice(cont_choice)
quit_action = action.Action(function=exit)
quit_choice = choice.Choice(key='q', text='Quit', action=quit_action)
main_menu.add_choice(quit_choice)

while True:
    main_menu.show()

Output

c: Continue
q: Quit
Choice: c
c: Continue
q: Quit
Choice: c
c: Continue
q: Quit
Choice: q

Process finished with exit code 0

Author

👤 Garrett Beard

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Garrett Beard.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

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

gb-menu-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gb_menu-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file gb-menu-1.0.0.tar.gz.

File metadata

  • Download URL: gb-menu-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for gb-menu-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f8b7f4c8f92a700c994541e8143e43650b42f64753fac0c4037751922da0fbd3
MD5 ebfd1e89e8e808f118beb7a921abbaee
BLAKE2b-256 6cc5f862aa7d0aae84850adb0b7913a86a3f38980ed705cb50d1f6fb60262647

See more details on using hashes here.

File details

Details for the file gb_menu-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gb_menu-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for gb_menu-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b29ac2bd67b167931b78933c7727c972bd130bb4f08085b95eac2032c5e18df
MD5 65bf003ad4c0e09a7c8037f9ac1da254
BLAKE2b-256 184dc3a85170d0016d99358088f0fdf62e4349b22efc98fb007db4de44a428b6

See more details on using hashes here.

Supported by

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