carlogtt_python_library.utils.user_input module

This module …

class carlogtt_python_library.utils.user_input.UserPrompter[source]

Bases: object

A collection of CLI prompt utilities to get and validate user input.

get_user_input_and_validate_int(question: str = 'Enter a number: ') int[source]

Request the user for an int question = “question as a str”

get_user_input_confirmation_y_n(question: str = 'Continue: (y/n): ', true: str = 'y', false: str = 'n') bool[source]

Request the user for a confirmation to continue question = “question as a str” true = “character to be used as continue” false = “character to be used to stop”