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

An abstract schema that describes some data. More...

Inheritance diagram for formatron.schemas.schema.Schema:
formatron.schemas.pydantic.ClassSchema

Class Methods

dict[str, FieldInfofields (cls)
 Get the fields of the schema.
 
"Schema" from_json (cls, str json)
 Create a schema from a JSON string.
 

Detailed Description

An abstract schema that describes some data.

Definition at line 48 of file schema.py.

Member Function Documentation

◆ fields()

dict[str, FieldInfo] formatron.schemas.schema.Schema.fields ( cls)

Get the fields of the schema.

Reimplemented in formatron.schemas.pydantic.ClassSchema.

Definition at line 61 of file schema.py.

◆ from_json()

"Schema" formatron.schemas.schema.Schema.from_json ( cls,
str json )

Create a schema from a JSON string.

Reimplemented in formatron.schemas.pydantic.ClassSchema.

Definition at line 78 of file schema.py.


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