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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nice-prompts-0.4.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for nice-prompts-0.4.3.tar.gz
Algorithm Hash digest
SHA256 eb73c79e60e7134e5070ed7086206f925ca41bfa4a4e9551e503069b55a83665
MD5 687de3d42c07d6350b2605f87f8f6820
BLAKE2b-256 ef12cc13ab4f2ba0925a46da7dc84b7055eb5716ab874092ff84d19a8f2285cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nice_prompts-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 105a266020c42917deaead7ee4754c261975ef30f6e8ff6e5d0a0119c2126ee9
MD5 d758ce84c1e5f8c4c7b1aff99483c513
BLAKE2b-256 32d5b36b5fc1fb2d8b9f55656181930129febefe89c34584f5b2719f8632bd41

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