Skip to content

API Reference parrot.helpers.infographics

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

parrot.helpers.infographics

View source

Helper façade for the infographic template and theme registries.

Wraps parrot.models.infographic_templates.infographic_registry and parrot.models.infographic.theme_registry so SDK consumers don't need to import registry singletons directly.

Alias InfographicTemplate

Re-exported from parrot.models.infographic_templates.InfographicTemplate.

Alias ThemeConfig

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

Function get_template

Retrieve a template by name.

get_template(name: str) -> InfographicTemplate

Parameter Type Default Description
name str Template identifier.

Returns: InfographicTemplate — The matching InfographicTemplate instance.

Raises:

  • KeyError — If the template name is not registered.

Function get_theme

Retrieve a theme by name.

get_theme(name: str) -> ThemeConfig

Parameter Type Default Description
name str Theme identifier.

Returns: ThemeConfig — The matching ThemeConfig instance.

Raises:

  • KeyError — If the theme name is not registered.

Alias infographic_registry

Re-exported from parrot.models.infographic_templates.infographic_registry.

Function list_templates

List available infographic template names.

list_templates(detailed: bool = False) -> Union[List[str], List[Dict[str, str]]]

Parameter Type Default Description
detailed bool False When True, return list of dicts with name + description.

Returns: Union[List[str], List[Dict[str, str]]] — Sorted list of names, or sorted list of detailed dicts when detailed=True.

Function list_themes

List available infographic theme names.

list_themes(detailed: bool = False) -> Union[List[str], List[Dict[str, str]]]

Parameter Type Default Description
detailed bool False When True, return list of dicts with name and key colour tokens (primary, neutral_bg, body_bg).

Returns: Union[List[str], List[Dict[str, str]]] — Sorted list of names, or sorted list of detailed dicts when detailed=True.

Function register_template

Register a custom infographic template.

Accepts either an InfographicTemplate instance or a raw dict that will be validated via InfographicTemplate.model_validate. Returns the validated template instance.

register_template(template: Union[InfographicTemplate, dict]) -> InfographicTemplate

Parameter Type Default Description
template Union[InfographicTemplate, dict] InfographicTemplate instance or a dict conforming to the InfographicTemplate schema.

Returns: InfographicTemplate — The registered InfographicTemplate instance.

Raises:

  • TypeError — If template is neither a dict nor an InfographicTemplate instance.
  • pydantic.ValidationError — If the dict payload is malformed.

Function register_theme

Register a custom infographic theme.

Accepts either a ThemeConfig instance or a raw dict that will be validated via ThemeConfig.model_validate. Returns the validated theme instance.

register_theme(theme: Union[ThemeConfig, dict]) -> ThemeConfig

Parameter Type Default Description
theme Union[ThemeConfig, dict] ThemeConfig instance or a dict conforming to the ThemeConfig schema.

Returns: ThemeConfig — The registered ThemeConfig instance.

Raises:

  • TypeError — If theme is neither a dict nor a ThemeConfig instance.
  • pydantic.ValidationError — If the dict payload is malformed.

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