patito
A dataframe modelling library built on top of polars and pydantic.
Decision gist · record as of 2026-08-14
Yes. Patito is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem for teams using polars with pydantic. It's particularly valuable if you need strict dataframe validation and test data generation. The MIT license poses no restrictions. Start with it if your workflow involves both type-annotated models and polars dataframes.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low install friction with only three runtime dependencies (polars, pydantic, typing-extensions).
- The package is actively maintained with recent releases and 635 repository stars, indicating stable ongoing development.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-02-04 (191 days) · last repo commit 2026-05-08 · 635 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 594,946 downloads/mo, #5,842 on PyPI
Alternatives
Verify before relying
pip install patito
import patito as pt
from typing import Literal
class Product(pt.Model):
product_id: int = pt.Field(unique=True)
temperature_zone: Literal["dry", "cold", "frozen"]
is_for_sale: bool
df = Product.examples({"is_for_sale": [True, False]})
Product.validate(df)What it is and what it does
Patito bridges pydantic and polars by letting you define dataframe schemas as type-annotated pydantic model subclasses. A single model class serves dual purpose: it defines the schema for polars DataFrames and represents individual rows as objects. This eliminates the need to maintain separate schema definitions and row representations.
The package provides three main capabilities: efficient dataframe validation with human-readable error messages, automatic generation of valid test data that respects all schema constraints, and utilities to work with dataframes in an object-oriented manner. You can validate incoming data, generate mock dataframes for tests without boilerplate, retrieve single rows as model instances, and apply schema-aware transformations. It is designed to work with polars but also supports pandas.
Use it for
- Validate incoming dataframes against strict type and constraint rules before processing, catching schema violations early.
- Generate valid test dataframes that satisfy all model constraints without manually creating dummy data for each test.
- Retrieve and work with individual dataframe rows as typed model instances rather than raw dictionary-like objects.
- Enforce a single source of truth for data models across your codebase by using the same pydantic class for both validation and ORM-like access.
- Apply field-level constraints like uniqueness, bounds, regex patterns, and custom expressions to validate dataframe contents.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Patito is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem for teams using polars with pydantic. It's particularly valuable if you need strict dataframe validation and test data generation. The MIT license poses no restrictions. Start with it if your workflow involves both type-annotated models and polars dataframes.
Install
patito on PyPI
Before you install
Low install friction with only three runtime dependencies (polars, pydantic, typing-extensions). The package is actively maintained with recent releases and 635 repository stars, indicating stable ongoing development.
Requires Python 3.9 or later.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install patito
import patito as pt
from typing import Literal
class Product(pt.Model):
product_id: int = pt.Field(unique=True)
temperature_zone: Literal["dry", "cold", "frozen"]
is_for_sale: bool
df = Product.examples({"is_for_sale": [True, False]})
Product.validate(df)
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespolarspydantictyping-extensions |
| Maintenance | Actively maintained 191 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 594,946 / month, #5,842 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: patito-0.8.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pydantic polars dataframe validation”
- patitoPatito combines pydantic models with polars DataFrames to provide…
- dataframelyDataframely validates the schema and content of Polars data frames…
- datacompyDataComPy compares two DataFrames across Pandas, Polars, Spark, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also dataframely · polars-runtime-compat · polars · grizz · polars-runtime-32 · polars-runtime-64 · pandera · polars-ds · polars-hash · polars-lts-cpu