Python library to build pretty command line user prompts with interactive forms and validation
Overall
score
96%
A command-line tool that collects user registration information with proper input validation and helpful error messages.
Create an interactive CLI tool that prompts users for registration details including username, email, and password. The tool must validate each input and provide clear, helpful error messages when validation fails.
@generates
The tool should implement a collect_registration() function that prompts for each field in sequence and returns the collected data.
def collect_registration():
"""
Collect user registration information through interactive prompts.
Prompts the user for:
- Username (alphanumeric + underscores, min 3 chars)
- Email (valid email format)
- Password (min 8 chars, with uppercase, lowercase, and digit)
Each field has custom validation with helpful error messages.
Returns:
dict: A dictionary containing 'username', 'email', and 'password' keys
with the validated user input values.
"""
passProvides interactive command-line prompts with validation support.
Install with Tessl CLI
npx tessl i tessl/pypi-questionarydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10