Skip to main content

A simple console menu system using curses

Project description

PyConsoleMenu

Language BUILD-STATUS

A simple Python menu in the terminal using curses. Ideal for people who want to quickly make a menu without writing their own complicated crutches. Includes: SelectorMenu, MultipleSelectorMenu, FunctionalMenu.

Preview

Selector

See other

Installation 💾

  • using pip
$ pip install PyConsoleMenu
  • using GitHub (требуется git)
$ git clone https://github.com/BaggerFast/PyConsoleMenu
$ cd PyConsoleMenu
$ pip install -r requirements.txt

Additionally ⌨️

  • Docs in code
  • Type hints

Usage example 👨‍💻

from PyConsoleMenu import MultiSelectorMenu, FunctionalOption, SelectorMenu, FunctionalMenu


def multi_selector():
    menu = MultiSelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='MultiSelector', count=3)
    ans = menu.input()
    print(ans)


def selector():
    menu = SelectorMenu(['Cheburashka', 'Parrot', 'Snake', 'Gena'], title='Selector')
    ans = menu.input()
    print(ans)


def functional():
    data = [
        FunctionalOption('Cheburashka', lambda: print('I am a Parrot')),
        FunctionalOption('Parrot', lambda: print('I am a Cheburashka')),
    ]
    menu = FunctionalMenu(data, title='Functional')
    ans = menu.input()
    ans()

See more examples

Was written in these videos on YouTube 👀
Video#1
Stream#1
Stream#2

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

PyConsoleMenu-1.0.4.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file PyConsoleMenu-1.0.4.tar.gz.

File metadata

  • Download URL: PyConsoleMenu-1.0.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for PyConsoleMenu-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d5222894d0fc4dcc0d1909f26009e03af43faf50c69974dc335554315e6755c9
MD5 c6aee63148066ce6b69b50420c241693
BLAKE2b-256 3df2cc0286df808c4ad327ca9383313a98d3467f5a626db46a24f0c786e93f58

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