Skip to main content

Advanced Prompts

Project description

aprompt - Advanced Prompts

aprompt provides a large set of prompts and corresponding themes as well as support for testing prompts. aprompt is designed for creating own prompts and themes.

Available Prompts

  • Text
  • Secret
  • Digit Code
  • Integer
  • Sort
  • Choice
  • Multiple Choice
  • Confirmation
  • Datetime
  • Date
  • Time

Features

  • Creation of custom prompts.
  • Creation of custom themes.
  • Testing features.
  • Examples and tutorials demonstrating the prompts.

Installation

pip install aprompt

Basic Usage

from aprompt import prompt, prompts

username = prompt(
    "Please enter your username.",
    prompts.text()
)

email = prompt(
    "Please enter an email.",
    prompts.text()
)

password = prompt(
    "Please set a password.",
    prompts.text(hide = True),
    validate = lambda x: Exception("password too short") if len(x) < 7 else None,
)

Links

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

aprompt-2.0.0a1.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

aprompt-2.0.0a1-py3-none-any.whl (9.2 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