Skip to main content

Dynamic Forms

fluvius.dform models reusable form definitions, typed elements, document templates, stored form data, query access, and policy-controlled commands.

from fluvius.dform import (
DocumentTemplate,
ElementModelRegistry,
FormConnector,
FormDomain,
FormModel,
FormModelRegistry,
setup_dform,
)

Compose setup_dform into a FastAPI application after configuring its database and authentication. FormDomain owns commands and policies, FormQueryManager handles reads, and FormDataManager / ElementDataManager persist definitions and values.

Set FLUVIUS_DFORM_DEFS_SCHEMA and FLUVIUS_DFORM_DATA_SCHEMA when definitions and submitted data live in separate schemas. The current domain includes a Casbin policy manager; applications should seed policies rather than bypassing command authorization.