yera.runtime.handlers.form_echo.ansi

ANSI form echo handler: prints one form submission at the terminal.

Symbols

class ANSIFormEchoHandler — Prints a form submission's outcome and its visible answers.

ANSIFormEchoHandler

Inherits: BaseHandler

Prints a form submission's outcome and its visible answers.

Methods

__init__ — Initialize the handler with its destination terminal console.
push — Print the form echo.

ANSIFormEchoHandler.__init__

__init__(
    console: Console,
) → None

Initialize the handler with its destination terminal console.

Parameters

console
type: Console

Rich console used to render submitted form values.

ANSIFormEchoHandler.push

push(
    event: OutputEvent,
) → None

Print the form echo.

Parameters

event
type: OutputEvent

An output event carrying FormEchoData.

Raises

TypeError

If the event data is not FormEchoData.