Formatron v0.4.9
Formatron empowers everyone to control the output format of language models with minimal overhead.
Loading...
Searching...
No Matches
formatron.schemas.schema.FieldInfo Class Reference

An abstract field info that describes a data field in a schema. More...

Inheritance diagram for formatron.schemas.schema.FieldInfo:
formatron.schemas.dict_inference.FieldInfo formatron.schemas.json_schema.FieldInfo formatron.schemas.pydantic.FieldInfo

Properties

typing.Type[typing.Any]|None annotation (self)
 Get the type annotation of the field.
 
bool required (self)
 Check if the field is required for the schema.
 

Detailed Description

An abstract field info that describes a data field in a schema.

Definition at line 13 of file schema.py.

Member Function Documentation

◆ annotation()

typing.Type[typing.Any] | None formatron.schemas.schema.FieldInfo.annotation ( self)

Get the type annotation of the field.

Reimplemented in formatron.schemas.dict_inference.FieldInfo, formatron.schemas.json_schema.FieldInfo, and formatron.schemas.pydantic.FieldInfo.

Definition at line 26 of file schema.py.

◆ required()

bool formatron.schemas.schema.FieldInfo.required ( self)

Check if the field is required for the schema.

Reimplemented in formatron.schemas.dict_inference.FieldInfo, formatron.schemas.json_schema.FieldInfo, and formatron.schemas.pydantic.FieldInfo.

Definition at line 43 of file schema.py.


The documentation for this class was generated from the following file: