Skip to main content

Use nice prompts in your terminal e.g. multiple choice

Project description

Nice-prompts.

Generate nice looking prompts for your cli applications.

PyPI PyPI - Python Version Read the Docs

Install from PyPi:

$ pip3 install nice-prompts

Demo (select 1, select at least 2 with max 2, select any amount):

import nice_prompts

n = nice_prompts.NicePrompt()

print(n.selection({"I like pizza": "Good taste",
    "I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
    "I hate pizza": "Bad sport 👎"})) # Select one from the keys, return the value

print(n.multiselection({"I like pizza": "Good taste",
    "I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
    "I hate pizza": "Bad sport 👎"}, amount=2, required=2)) # Select multiple from the keys, return the values. You must select 2


print(n.multiselection({"I like pizza": "Good taste",
    "I respectfully disagree with the opinion of liking pizza": "Fair enough, good day",
    "I hate pizza": "Bad sport 👎"}, required=0))  # Select multiple from the keys, return the values. No max, can be left blank

Demo

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

nice-prompts-0.4.3.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

nice_prompts-0.4.3-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

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