Skip to content

API Reference parrot.migrations.catalog

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.migrations.catalog

View source

Deterministic migration discovery, loading, rendering and local authoring.

Migration SQL may use only {schema} and {bots_table} replacement tokens. Both are identifier contexts: callers replace them with PostgreSQL quoted identifiers, while JSON braces and all other SQL text remain literal.

Alias MigrationConfigurationError

Re-exported from parrot.migrations.models.MigrationConfigurationError.

Alias MigrationFile

Re-exported from parrot.migrations.models.MigrationFile.

Alias MigrationSet

Re-exported from parrot.migrations.models.MigrationSet.

Function discover_sets

Load sorted parrot.migrations entry points; reject ambiguous providers.

discover_sets() -> tuple[MigrationSet, ...]

Returns: tuple[MigrationSet, ...]

Function load_migrations

Validate contiguous body/check pairs and checksum their exact UTF-8 bytes.

load_migrations(migration_set: MigrationSet) -> tuple[MigrationFile, ...]

Parameter Type Default Description
migration_set MigrationSet

Returns: tuple[MigrationFile, ...]

Function render_sql

Replace exact configured identifier tokens while preserving JSON braces.

render_sql(sql: str, *, schema: str, bots_table: str) -> str

Parameter Type Default Description
sql str
schema str
bots_table str

Returns: str

Function scaffold

Exclusively create the next body/check pair in an explicit source directory.

scaffold(set_name: str, name: str, *, directory: Path) -> tuple[Path, Path]

Parameter Type Default Description
set_name str
name str
directory Path

Returns: tuple[Path, Path]

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