Skip to content

API Reference parrot_formdesigner.services.a2ui_export

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

parrot_formdesigner.services.a2ui_export

View source

Bulk export of forms as A2UI surfaces / JSON Schema (FEAT-650, spec §3 M3).

The in-memory FormRegistry view is a cache: :meth:A2UIExportService.export_tenant always hydrates from storage first (codex S7) and never crosses tenants.

Class A2UIExportService

Export the forms of one tenant through a configured renderer.

Parameter Type Default Description
registry FormRegistry Tenant-scoped form registry.
renderer AbstractFormRenderer | None None Renderer override. When omitted, resolve the requested dialect.
dialect str 'a2ui' Output dialect, either "a2ui" or "json_schema".
locale str 'en' Locale forwarded to the renderer.

Method A2UIExportService.export_form

Render one form, returning an error row for missing forms or failures.

export_form(form_uid: uuid.UUID, *, tenant: str) -> ExportedSurface

Parameter Type Default Description
form_uid uuid.UUID Immutable form identity.
tenant str Tenant that owns the form.

Returns: ExportedSurface — The rendered export row or an error row.

Method A2UIExportService.export_tenant

Yield exports for one tenant after hydrating its storage cache.

export_tenant(tenant: str, *, form_uids: Sequence[uuid.UUID] | None = None, published_only: bool = False, is_visible: Callable[[FormSchema], bool] | None = None) -> AsyncIterator[ExportedSurface]

Parameter Type Default Description
tenant str Tenant whose forms are exported.
form_uids Sequence[uuid.UUID] | None None Optional allowlist of form identities.
published_only bool False Whether to include only published forms.
is_visible Callable[[FormSchema], bool] | None None Optional per-form visibility predicate. A form for which it returns False is skipped entirely — no row is yielded for it, not even an error row. None (the default) yields every form, which is what the CLI exporter relies on: it has no request to authorize against.

Returns: AsyncIterator[ExportedSurface]

Alias AbstractFormRenderer

Re-exported from parrot_formdesigner.renderers.base.AbstractFormRenderer.

Class ExportedSurface

One exported form represented by one NDJSON line.

Fields:

Field Type Default Description
form_uid str
form_id str
version str
dialect str
envelope dict[str, Any] | None None
warnings list[str]
error str | None None

Alias FormRegistry

Re-exported from parrot_formdesigner.services.registry.FormRegistry.

Alias FormSchema

Re-exported from parrot_formdesigner.core.schema.FormSchema.

Attribute logger

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