Skip to content
masterclass Buddy

Pydantic · Type Alias

confloat

confloat creates a float type with optional constraints such as bounds, multiples, strict validation, and special-value handling. Pydantic recommends Annotated[float, Field(...)] for new code.

Last updated

Syntax

confloat(*, strict: bool | None = None, gt: float | None = None, ge: float | None = None, lt: float | None = None, le: float | None = None, multiple_of: float | None = None, allow_inf_nan: bool | None = None) -> type[float]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Annotated
  • Field
  • float
  • ValidationError

Source: Pydantic Types | Pydantic Docs. Checked 2026-11-03.