yera.runtime.handlers.form.ansi
ANSI form handler: asks each field of a form at the terminal.
Symbols
ANSIFormHandler
Inherits:
BaseHandlerAsks for each field of a form at the terminal and submits the answers.
Methods
ANSIFormHandler.__init__
__init__(
console: Console,
) → NoneInitialize the form handler with its interactive terminal console.
Parameters
console
type: Console
Rich console used to present form prompts and validation.
ANSIFormHandler.push
push(
event: OutputEvent,
) → NoneAsk the form's questions and submit the answers.
Parameters
event
type: OutputEvent
An output event carrying FormData.
Raises
TypeError
If the event data is not FormData.
ValueError
If the user cancels a question.