Skip to content
masterclass Buddy

Pydantic · Type Alias

PastDatetime

PastDatetime is a Pydantic type for datetime values that must be in the past when validated. Use it as a model field annotation.

Last updated

Syntax

class Model(BaseModel):
    value: PastDatetime

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

Subscribe
  • FutureDatetime
  • AwareDatetime
  • NaiveDatetime
  • datetime.datetime
  • Field

Source: Standard Library Types. Checked 2026-11-03.