Skip to content
masterclass Buddy

Pydantic · Type Alias

NonPositiveInt

NonPositiveInt is a Pydantic type for integers less than or equal to zero. It accepts negative integers and zero, but rejects positive integers.

Last updated

Syntax

from pydantic import NonPositiveInt

value: NonPositiveInt

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

Subscribe
  • NegativeInt
  • NonNegativeInt
  • PositiveInt
  • StrictInt
  • annotated_types.Le

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