Skip to content

API Reference parrot_formdesigner.extractors.yaml

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

parrot_formdesigner.extractors.yaml

View source

YAML extractor for FormSchema generation.

Parses YAML form definitions into FormSchema instances. Supports both the legacy format (used by existing form YAML files) and the new format with full i18n, constraints, and dependency rules.

Uses yaml_rs (Rust) when available, falls back to PyYAML.

Alias ConditionOperator

Re-exported from parrot_formdesigner.core.constraints.ConditionOperator.

Alias DependencyOperation

Re-exported from parrot_formdesigner.core.constraints.DependencyOperation.

Alias DependencyRule

Re-exported from parrot_formdesigner.core.constraints.DependencyRule.

Alias EntityRef

Re-exported from parrot_formdesigner.core.relations.EntityRef.

Alias FieldCondition

Re-exported from parrot_formdesigner.core.constraints.FieldCondition.

Alias FieldConstraints

Re-exported from parrot_formdesigner.core.constraints.FieldConstraints.

Alias FieldOption

Re-exported from parrot_formdesigner.core.options.FieldOption.

Alias FieldType

Re-exported from parrot_formdesigner.core.types.FieldType.

Alias FormField

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

Alias FormSchema

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

Alias FormSection

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

Alias LocalizedString

Re-exported from parrot_formdesigner.core.types.LocalizedString.

Alias PostDependency

Re-exported from parrot_formdesigner.core.constraints.PostDependency.

Alias RelationSpec

Re-exported from parrot_formdesigner.core.relations.RelationSpec.

Alias SubmitAction

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

Attribute YAMLExtractor

Class YamlExtractor

Parses YAML form definitions into FormSchema instances.

Supports two YAML formats:

Legacy format (backward compatible): - Fields use name and type keys - Validation rules use legacy names (min_length, max_length, etc.) - FieldType values use old names (choice, multichoice, toggle, textarea) - Section-level name and title keys

Method YamlExtractor.extract

Parse YAML string content into a FormSchema.

Alias for extract_from_string for API consistency.

extract(content: str) -> FormSchema

Parameter Type Default Description
content str YAML string to parse.

Returns: FormSchema — FormSchema representing the parsed YAML.

Method YamlExtractor.extract_from_string

Parse YAML string content into a FormSchema.

extract_from_string(content: str) -> FormSchema

Parameter Type Default Description
content str YAML string to parse.

Returns: FormSchema — FormSchema representing the parsed YAML.

Raises:

  • ImportError — If no YAML parser is available.
  • ValueError — If the YAML content is invalid or missing required fields.

Method YamlExtractor.extract_from_file

Load and parse a YAML form definition file.

extract_from_file(path: str | Path) -> FormSchema

Parameter Type Default Description
path str | Path Path to the YAML file.

Returns: FormSchema — FormSchema representing the parsed YAML.

Raises:

  • FileNotFoundError — If the path does not exist.
  • ImportError — If no YAML parser is available.

Alias resolve_rule_references

Re-exported from parrot_formdesigner.core.resolution.resolve_rule_references.

Attribute yaml_loads

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