Skip to content

API Reference parrot_formdesigner.tools.field_helpers

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

parrot_formdesigner.tools.field_helpers

View source

Helper utilities for supported form field definitions.

This module centralizes the accepted FieldType values and provides minimal JSON snippets for each field type. These snippets are intended for form creation/editing flows where agents or UIs need quick reference payloads.

Alias FieldType

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

Function get_dependency_rule_snippets

Return skeleton dicts for building depends_on and post_depends rules.

The returned skeletons are minimal but valid — each one can be passed directly to the corresponding Pydantic model constructor. They are intended for use by LLMs and designer UIs that need a quick-start template when adding conditional logic to form fields.

Example::

snippets = get_dependency_rule_snippets()
from parrot_formdesigner.core import DependencyRule
rule = DependencyRule(**snippets["depends_on"])

get_dependency_rule_snippets() -> dict[str, Any]

Returns: dict[str, Any] — A dictionary with two top-level keys: - "depends_on" — a skeleton DependencyRule dict. - "post_depends" — a list containing one skeleton PostDependency dict for each common effect category.

Function get_form_field_schema_snippets

Return example JSON snippets for each supported field type.

Returns a copy to avoid accidental mutation by callers.

get_form_field_schema_snippets() -> dict[str, dict[str, Any]]

Returns: dict[str, dict[str, Any]]

Function list_supported_form_field_types

Return supported field type values for FormField.field_type.

list_supported_form_field_types() -> list[str]

Returns: list[str]

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