Skip to content

Field Metadata Properties

Each value in the dict[str, FieldMetadata] returned by extract() is a FieldMetadata instance with the following properties.

Basic Properties

Property Type Description
field_name str Name of the field
field_type type Field type (simplified for multivalued types)
effective_type type items_type for collections, field_type otherwise
original_annotation Any Original annotation, preserving Annotated, Union, etc.

Type Flags

Property Type Description
multivalued bool True for list, tuple, set, frozenset
composite bool True for nested dataclasses / Pydantic models
optional bool True for Optional or Union with None
numeric bool True for int, float, Decimal, datetime, date, time, timedelta (not bool)
categorical bool False for numeric types, composite, or NonCategorical annotation
computed bool True for properties and Pydantic computed fields
derived bool True for synthetic fields generated by hooks
final bool True when the field has no non-derived subfields

Metadata Properties

Property Type Description
items_type type \| None Item type for collections; None otherwise
parent_field FieldMetadata \| None Parent field metadata; None for root fields
doc str \| None Documentation from DocInfo annotation
order int Relative display position (default 1000; lower = first; may be negative)
classification dict Classification metadata (e.g. tlp, semantic, role)
extra dict Additional metadata (constraints, flags, etc.)