schedr.pydantic

schedr.pydantic.Model: the base of Pydantic outcome models (needs Pydantic installed).

Importing this module imports Pydantic; nothing else in schedr does, so schedr never depends on it. A Pydantic model that is an outcome (a member of a union a task returns) derives from Model instead of BaseModel, as a dataclass outcome derives from schedr.Data: type checkers then accept .on(Remote) and >> on it (see schedr.Data). Ordinary data stays a plain BaseModel.

class schedr.pydantic.Model

Bases: BaseModel

The base of Pydantic outcome models: class Remote(Model): url: str.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].