sequential
Class info¶
🛈 DocStrings¶
Ask for a form one field at a time (prompt-toolkit), where a full TUI can't run.
Walks the same form tree as the Textual renderer: each field is a prompt that checks its input as it's typed (the field's own constraints), choices and union variants are numbered lists, lists and maps ask whether to add another entry, and optional objects ask whether to fill them in at all. After the last field the whole value is validated; on problems they're listed and the form is asked again, with everything entered so far as the defaults.
fill_sequential
async
¶
fill_sequential(
target: FormTarget[Any] | type[Any] | Mapping[str, Any],
*,
title: str | None = None,
initial: Mapping[str, Any] | None = None,
session: PromptSession[str] | None = None,
echo: Callable[[str], None] = print,
) -> Any
Ask for every field in turn and return the validated result.