Skip to content

API Reference parrot.outputs.formats.infographic_html

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.outputs.formats.infographic_html

View source

Infographic HTML Renderer for AI-Parrot.

Renders InfographicResponse structured output as a self-contained HTML5 document with inline CSS and (optionally) inline ECharts JS for charts.

This renderer is a sibling to InfographicRenderer (JSON); content negotiation in get_infographic() decides which one to use.

Attribute ACCORDION_JS

Alias AccordionBlock

Re-exported from parrot.models.infographic.AccordionBlock.

Alias AccordionItem

Re-exported from parrot.models.infographic.AccordionItem.

Alias BaseRenderer

Re-exported from parrot.outputs.formats.base.BaseRenderer.

Alias BlockType

Re-exported from parrot.models.infographic.BlockType.

Alias BulletListBlock

Re-exported from parrot.models.infographic.BulletListBlock.

Alias BulletListStyle

Re-exported from parrot.models.infographic.BulletListStyle.

Alias CalloutBlock

Re-exported from parrot.models.infographic.CalloutBlock.

Alias CalloutLevel

Re-exported from parrot.models.infographic.CalloutLevel.

Alias CardGridBlock

Re-exported from parrot.models.infographic.CardGridBlock.

Alias ChainBlock

Re-exported from parrot.models.infographic.ChainBlock.

Alias ChainNode

Re-exported from parrot.models.infographic.ChainNode.

Alias ChangelogEntry

Re-exported from parrot.models.infographic.ChangelogEntry.

Alias ChartBlock

Re-exported from parrot.models.infographic.ChartBlock.

Alias ChartDataSeries

Re-exported from parrot.models.infographic.ChartDataSeries.

Alias ChartType

Re-exported from parrot.models.infographic.ChartType.

Alias ChecklistBlock

Re-exported from parrot.models.infographic.ChecklistBlock.

Alias ChecklistItem

Re-exported from parrot.models.infographic.ChecklistItem.

Alias CodeBlock

Re-exported from parrot.models.infographic.CodeBlock.

Alias ColumnDef

Re-exported from parrot.models.infographic.ColumnDef.

Alias DesignSystem

Re-exported from parrot.outputs.formats.assets.design_system.DesignSystem.

Alias DividerBlock

Re-exported from parrot.models.infographic.DividerBlock.

Alias DocumentMeta

Re-exported from parrot.models.infographic.DocumentMeta.

Alias GridCard

Re-exported from parrot.models.infographic.GridCard.

Alias HeroCardBlock

Re-exported from parrot.models.infographic.HeroCardBlock.

Alias ImageBlock

Re-exported from parrot.models.infographic.ImageBlock.

Class InfographicHTMLRenderer

Renders InfographicResponse as a self-contained HTML5 document.

Produces a complete HTML page with inline CSS (themed via CSS custom properties) and optional inline ECharts JS for chart blocks.

Usage::

renderer = InfographicHTMLRenderer()
html = renderer.render_to_html(infographic_response, theme="dark")

Method InfographicHTMLRenderer.render

Render an AIMessage containing InfographicResponse as HTML.

render(response: Any, environment: str = 'terminal', export_format: str = 'html', include_code: bool = False, **kwargs) -> Tuple[str, Optional[Any]]

Parameter Type Default Description
response Any AIMessage with structured_output or output.
environment str 'terminal' Ignored (always produces HTML).
export_format str 'html' Ignored.
include_code bool False Ignored.
**kwargs {} May include theme (str) and layout (str, "analytics" | "report" | "print").

Returns: Tuple[str, Optional[Any]] — Tuple of (html_string, html_string).

Method InfographicHTMLRenderer.render_to_html

Convert InfographicResponse to a complete HTML document.

This method is usable outside the renderer pipeline (e.g. for PDF export, email embedding, file saving).

render_to_html(data: Union[InfographicResponse, dict], theme: Optional[str] = None, layout: str = 'analytics') -> str

Parameter Type Default Description
data Union[InfographicResponse, dict] An InfographicResponse model or a raw dict.
theme Optional[str] None Theme name (falls back to response.theme, then "light").
layout str 'analytics' Design-system layout name (FEAT-493 TASK-2712) — one of :attr:~parrot.outputs.formats.assets.design_system.DesignSystem.LAYOUTS. Defaults to "analytics" (the new default look-and-feel); pass "report" to reproduce this renderer's previous appearance (the legacy BASE_CSS, now layout-report.css).

Returns: str — Complete HTML5 string with inline CSS.

Alias InfographicResponse

Re-exported from parrot.models.infographic.InfographicResponse.

Alias OutputMode

Re-exported from parrot.models.outputs.OutputMode.

Alias ProgressBlock

Re-exported from parrot.models.infographic.ProgressBlock.

Alias QuoteBlock

Re-exported from parrot.models.infographic.QuoteBlock.

Attribute SETLANG_JS

Alias StepItem

Re-exported from parrot.models.infographic.StepItem.

Alias StepsBlock

Re-exported from parrot.models.infographic.StepsBlock.

Alias SummaryBlock

Re-exported from parrot.models.infographic.SummaryBlock.

Attribute TAB_JS

Alias TabPane

Re-exported from parrot.models.infographic.TabPane.

Alias TabViewBlock

Re-exported from parrot.models.infographic.TabViewBlock.

Alias TableBlock

Re-exported from parrot.models.infographic.TableBlock.

Alias TableStyle

Re-exported from parrot.models.infographic.TableStyle.

Alias ThemeConfig

Re-exported from parrot.models.infographic.ThemeConfig.

Alias TimelineBlock

Re-exported from parrot.models.infographic.TimelineBlock.

Alias TitleBlock

Re-exported from parrot.models.infographic.TitleBlock.

Alias TrendDirection

Re-exported from parrot.models.infographic.TrendDirection.

Alias format_cell

Re-exported from parrot.outputs.a2ui_renderers._table_format.format_cell.

Alias is_numeric_column

Re-exported from parrot.outputs.a2ui_renderers._table_format.is_numeric_column.

Attribute logger

Alias register_renderer

Re-exported from parrot.outputs.formats.register_renderer.

Alias theme_registry

Re-exported from parrot.models.infographic.theme_registry.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally