Skip to content
masterclass Buddy

Pydantic · Type Alias

StrictBool

StrictBool accepts only real boolean values. It prevents the coercion that a regular bool field allows for inputs such as 0, 1, or selected strings.

Last updated

Syntax

StrictBool

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

Subscribe
  • bool
  • Strict()
  • StrictBytes
  • StrictFloat
  • StrictInt
  • StrictStr

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