dataframely
A declarative, polars-native data frame validation library
What it is and what it does
Dataframely is a Python validation library designed specifically for Polars data frames. It lets you define schemas as Python classes with typed fields and optional constraints (nullable, min_length, etc.), then validate and cast data frames against those schemas in a single call. The library supports both field-level validation and cross-field rules written as Polars expressions, making it possible to enforce complex business logic (e.g., ratio constraints between columns) declaratively.
The package depends on numpy, polars, and typing-extensions. It targets modern Python versions (3.10+) and ships as compiled wheels for multiple platforms (macOS, Linux, Windows). Validation is typically used in data pipelines to catch schema mismatches early and ensure data quality before downstream processing.
Use it for:
- Validate incoming CSV or database exports against an expected schema before processing in a data pipeline.
- Enforce business rules (e.g., price > 0, bedroom-to-bathroom ratios) on data frame columns using declarative cross-field rules.
- Add type hints to data frames in notebooks or scripts so that IDE and type checkers understand the structure of validated data.
- Catch and report schema violations (missing columns, wrong types, null values) early in ETL workflows.
- Define reusable schemas for repeated validation tasks across multiple data sources or team members.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dataframely validates the schema and content of Polars data frames using declarative class-based schemas with field constraints and custom validation rules.
Yes, with conditions. Dataframely is actively maintained, has no known vulnerabilities, and solves a real problem for Polars users who need declarative schema validation. However, verify the license before use in proprietary work, and be aware that the package is relatively new (first release March 2025)—test it in non-critical pipelines first if you require battle-tested stability.
Install
dataframely on PyPI
pip
pip install dataframelyuv
uv add dataframelypoetry
poetry add dataframelyInstalling dataframely
Before you install
Medium install friction due to compiled wheels (cp310-abi3 binaries for multiple platforms). Active maintenance with a release 14 days ago and 610 repository stars suggest ongoing development and community use.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before adopting in proprietary or restricted environments.
Quickstart
pip install dataframely
import dataframely as dy
import polars as pl
class MySchema(dy.Schema):
column_name = dy.String(nullable=False)
df = pl.DataFrame({"column_name": ["value"]})
validated = MySchema.validate(df, cast=True)
Requires Python 3.10 or later and Polars as a runtime dependency.
Verify before relying
- Whether the package is suitable for production pipelines given its recent first release (2025-03-14).
- Exact license terms and any restrictions on commercial use.
- Performance characteristics when validating large data frames.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — numpy, polars, typing-extensions |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 297,366/month — #7,886 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dataframely-3.0.0-cp310-abi3-macosx_10_12_x86_64.whl; dataframely-3.0.0-cp310-abi3-macosx_11_0_arm64.whl; dataframely-3.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; dataframely-3.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; dataframely-3.0.0-cp310-abi3-win_amd64.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
patitoPatito combines pydantic models with polars…
permissive · top 15,000 on PyPI
polarsPolars is a DataFrame query engine written in…
permissive · top 1,000 on PyPI
grizzgrizz provides composable ingestors and…
permissive · top 15,000 on PyPI
polars-runtime-compatPolars-runtime-compat provides binary wheels…
permissive · top 15,000 on PyPI
polars-dsPolars-ds adds data science and machine…
permissive · top 15,000 on PyPI
polars-runtime-32Polars-runtime-32 is a compiled runtime…
permissive · top 1,000 on PyPI
janafSearches and parses NIST-JANAF thermochemical…
permissive · top 15,000 on PyPI
polars-lts-cpupolars-lts-cpu is a CPU-optimized DataFrame…
permissive · top 15,000 on PyPI
polars-runtime-64A Rust-based analytical query engine for…
permissive · top 15,000 on PyPI
polars-cloudPolars Cloud extends the Polars DataFrame…
permissive · top 15,000 on PyPI