Skip to main content

Enhanced Menu and CLI generator

Project description

 _                               _ _
| |                             | (_)
| |__  _   _ _ __   ___ _ __ ___| |_
| '_ \| | | | '_ \ / _ \ '__/ __| | |
| | | | |_| | |_) |  __/ | | (__| | |
|_| |_|\__, | .__/ \___|_|  \___|_|_|
        __/ | |
       |___/|_|               v 0.1.6

hypercli

hypercli is a Python library for creating a good looking command line interface. Primarily it can generate menu with very simple steps. We can also create some banners as well. Everything one need to create create interactive command line interface.

Installation

Use the package manager pip to install hypercli.

pip install hypercli

Demonstration

from hypercli import cli
import webbrowser


def author_name():
    print("HYP3R00T")


def open_website():
    webbrowser.open("https://hyperoot.live")


hyper = cli()

hyper.create_banner("hypercli")
hyper.create_intro("Intro", "An elegant solution to interact\n with command line tools")

hyper.create_menu("Main Menu", "Enter your choice")
hyper.add_option("Main Menu", "Checkout the Sub Menu", "Sub Menu")
hyper.add_option("Main Menu", "Print Author Name", author_name)

hyper.create_menu("Sub Menu", "Enter your choice")
hyper.add_option("Sub Menu", "Go Back to Main Menu", "Main Menu")
hyper.add_option("Sub Menu", "Checkout the Website (hyperoot.live)", open_website)

response = hyper.show_cli()
response()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

hypercli-0.1.6.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file hypercli-0.1.6.tar.gz.

File metadata

  • Download URL: hypercli-0.1.6.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for hypercli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8192e78612d5a5829f63e3e323123767e80dd28d70fb76f9d971341a1d4c0e8b
MD5 c9adfcd065649b8056a93d457d51fb05
BLAKE2b-256 419fa73eec060753f2e7e9dca2a2a15a705fd8c338e1f8481688090edbeac0fa

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