Usage
Integration between the Bioregistry and Pydantic type annotations.
Semantic Pydantic is a wrapper around pydantic.Field and
FastAPI’s fastapi.param_functions like fastapi.Path
that enables annotating the semantic space from which data in that field
comes via the Bioregistry.
- SemanticBody(*args: Any, prefix: str, **kwargs: Any) FieldInfo[source]
Create a FastAPI Body parameter, annotated with a Bioregistry prefix.
- SemanticField(*args: Any, prefix: str, **kwargs: Any) FieldInfo[source]
Create a Pydantic Field, annotated with a Bioregistry prefix.
- SemanticForm(*args: Any, prefix: str, **kwargs: Any) FieldInfo[source]
Create a FastAPI Form parameter, annotated with a Bioregistry prefix.
- SemanticHeader(*args: Any, prefix: str, **kwargs: Any) FieldInfo[source]
Create a FastAPI Header parameter, annotated with a Bioregistry prefix.