Patito offers a simple way to declare pydantic data models which double as schema for your polars data frames. These schema can be used for:

👮 Simple and performant data frame validation.
🧪 Easy generation of valid mock data frames for tests.
🐍 Retrieve and represent singular rows in an object-oriented manner.
🧠 Provide a single source of truth for the core data models in your code base.

Patito has first-class support for polars, a “blazingly fast DataFrames library written in Rust”.


You can simply install Patito with pip like so:

pip install patito

DuckDB Integration

Patito can also integrate with DuckDB. In order to enable this integration you must explicitly specify it during installation:

pip install 'patito[duckdb]'