Skip to content

API Reference parrot.metrics.importers

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

parrot.metrics.importers

View source

Flex kpi-table.md → recipe-sourced MetricDefinition importer (FEAT-756 M2).

Alias ChartShape

Re-exported from parrot.metrics.models.ChartShape.

Alias DataTableShape

Re-exported from parrot.metrics.models.DataTableShape.

Alias DimensionSpec

Re-exported from parrot.metrics.models.DimensionSpec.

Alias KPICardShape

Re-exported from parrot.metrics.models.KPICardShape.

Attribute KPI_TABLE_HEADER

Class KpiTableRow

One row of the Flex kpi-table.md table: kpi, transformer, dataset_aliases, recipe_path, output_mode, filters.

Fields:

Field Type Default Description
kpi str
transformer str
dataset_aliases list[str]
recipe_path str
output_mode str
filters list[str]

Alias MapShape

Re-exported from parrot.metrics.models.MapShape.

Alias MetricDefinition

Re-exported from parrot.metrics.models.MetricDefinition.

Alias PeriodBinding

Re-exported from parrot.metrics.models.PeriodBinding.

Alias RecipeSource

Re-exported from parrot.metrics.models.RecipeSource.

Alias TimeSpec

Re-exported from parrot.metrics.models.TimeSpec.

Function import_kpi_table

Convert rows to RecipeSource definitions: KPICard hero → KPICardShape, STRUCTURED_CHART → ChartShape(line), STRUCTURED_TABLE → DataTableShape, STRUCTURED_MAP → MapShape; the Supported filters cell becomes dimensions (minus the period filter, which becomes TimeSpec).

import_kpi_table(markdown: str, *, recipe_name: str, recipe_owner: str | None, tenant: str | None, program: str | None = None, period_param: str = 'month') -> list[MetricDefinition]

Parameter Type Default Description
markdown str
recipe_name str
recipe_owner str | None
tenant str | None
program str | None None
period_param str 'month'

Returns: list[MetricDefinition]

Function parse_kpi_table

Parse the 6-column GFM table (header | KPI | Transformer | Dataset alias(es) | Recipe path | Output mode | Supported filters |).

parse_kpi_table(markdown: str) -> list[KpiTableRow]

Parameter Type Default Description
markdown str

Returns: list[KpiTableRow]

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