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.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

nice_prompts-0.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file nice-prompts-0.2.1.tar.gz.

File metadata

  • Download URL: nice-prompts-0.2.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nice-prompts-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1a36b1e06f279c2af794d53527c2cf09b9846af4da56954f8521cb728f4eef46
MD5 eaec9bbab35b82347a4a3b7ef5001bc6
BLAKE2b-256 3ab3273c63cdac635c7847479809991e0569030ce297768b6cd9c1c6fd688615

See more details on using hashes here.

File details

Details for the file nice_prompts-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: nice_prompts-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nice_prompts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3496f4c71d745de770b503e01f81ee4ce9a14119bfe3779ae4dd3e1a24a6884
MD5 106afc70394f5cdd5ceba5d5d402924f
BLAKE2b-256 cee2a6ca35755361429574ce78a9fb98d9848cd067a5c5ad3092316041f681f2

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