zuke.tools.console
@zuke/console 1.5.0: @zuke/console — task-shaped console output for Zuke builds, so a build never reaches for console.log.
zuke on PyPI ↗ 1 symbols
Symbols
class ConsoleTasks Task-shaped console output. A single namespaced object (like FileTasks) rather than loose helpers: logging methods, structural primitives, and configuration all hang off ConsoleTasks.
-
static async info(ctx: ServiceContext, message: str) -> NoneLog an informational message (markup-aware).
-
static async log(ctx: ServiceContext, message: str) -> NoneAlias for ConsoleTasksApi.info.
-
static async success(ctx: ServiceContext, message: str) -> NoneLog a success/completion message.
-
static async warn(ctx: ServiceContext, message: str) -> NoneLog a warning (a
::warning::annotation under GitHub Actions). -
static async error(ctx: ServiceContext, message: str, options: Mapping[str, object] | None=None) -> NoneLog an error, optionally appending a thrown value's message.
-
static async debug(ctx: ServiceContext, message: str) -> NoneLog a debug diagnostic (shown only at
debug/tracelevel). -
static async trace(ctx: ServiceContext, message: str) -> NoneLog the most verbose trace output (shown only at
tracelevel). -
static async escape(ctx: ServiceContext, text: str) -> objectEscape
[/]intextso it renders literally rather than as markup — for embedding arbitrary or untrusted strings in a message. -
static async line(ctx: ServiceContext, options: object | None=None) -> NonePrint a horizontal rule spanning the width.
-
static async rule(ctx: ServiceContext, title: str | None=None, options: Mapping[str, object] | None=None) -> NonePrint a rule, optionally with a centred title.
-
static async box(ctx: ServiceContext, content: str | Sequence[str], options: object | None=None) -> NonePrint a bordered panel around
content(markup-aware). -
static async table(ctx: ServiceContext, columns: Sequence[object], rows: Sequence[Sequence[str]], options: object | None=None) -> NonePrint an aligned table; header and cell text may contain markup.
-
static async header(ctx: ServiceContext, name: str) -> NonePrint the ruled banner Zuke opens a target's section with.
-
static async logo(ctx: ServiceContext, options: Mapping[str, object] | None=None) -> NonePrint the Zuke ASCII logo, two-tone when colour is on.
-
static async summary(ctx: ServiceContext, reports: Sequence[object], total_ms: float, ok: bool) -> NonePrint the end-of-build summary table and closing verdict.
-
static async group(ctx: ServiceContext, name: str) -> NoneOpen a collapsible group; close it with ConsoleTasksApi.endGroup.
-
static async end_group(ctx: ServiceContext) -> NoneClose the group opened by ConsoleTasksApi.group.
-
static async configure(ctx: ServiceContext, options: Mapping[str, object]) -> NoneReconfigure logging (level, sink, theme, colour, width, Actions mode).
-
static async level(ctx: ServiceContext) -> objectThe active minimum severity.
-
static async reset(ctx: ServiceContext) -> NoneReset all configuration to defaults (level re-seeded from the env).