🗂 Table of Contents
📖 Introduction
Dataframely is a Python package to validate the schema and content of polars data frames. Its
purpose is to make data pipelines more robust by ensuring that data meets expectations and more readable by adding
schema information to data frame type hints.
💿 Installation
You can install dataframely using your favorite package manager, e.g., pixi or pip:
pixi add dataframely
pip install dataframely
🎯 Usage
Defining a data frame schema
import dataframely as dy
import polars as pl
class HouseSchema(dy.Schema):
zip_code = dy.String(nullable=False, min_length=3)
num_bedrooms = dy.UInt8(nullable=False)
num_bathrooms = dy.UInt8(nullable=False)
price = dy.Float64(nullable=False)
@dy.rule()
def reasonable_bathroom_to_bedroom_ratio(cls) -> pl.Expr:
ratio = pl.col("num_bathrooms") / pl.col("num_bedrooms")
return (ratio >= 1 / 3) & (ratio <= 3)
@dy.rule()
def minimum_zip_code_count(cls) -> pl.Expr:
return (pl.len() >= 2).over("zip_code")
Validating data against schema
import polars as pl
df = pl.DataFrame(
{
"zip_code": ["01234", "01234", "1", "213", "123", "213"],
"num_bedrooms": [2, 2, 1, None, None, 2],
"num_bathrooms": [1, 2, 1, 1, 0, 8],
"price": [100_000, 110_000, 50_000, 80_000, 60_000, 160_000],
}
)
# Validate the data and cast columns to expected types
validated_df: dy.DataFrame[HouseSchema] = HouseSchema.validate(df, cast=True)
See more advanced usage examples in the documentation.
Metadata
Release files for dataframely 3.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dataframely-3.1.2.tar.gz | 437.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dataframely-3.1.2-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| dataframely-3.1.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| dataframely-3.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| dataframely-3.1.2-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| dataframely-3.1.2-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 42.5 MB
Release files / dataframely-3.1.2.tar.gz
| Download URL | dataframely-3.1.2.tar.gz |
|---|---|
| Size | 437.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8954ed64dfc3a9f1d09f5b20462aca5ed7d62ab13976d5809c317734afbb2cb
|
|
BLAKE2b-256 checksum How to use checksums |
52dec3c9dafe0c22ef72c93c5ab41a5e2521a45bcd2949f20d1f5e5bc069f010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / dataframely-3.1.2-cp310-abi3-win_amd64.whl
| Download URL | dataframely-3.1.2-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e5eae3b035b4f975e8594c1418a981d129318383b555627682d8ea8372f98756
|
|
BLAKE2b-256 checksum How to use checksums |
932e6fd1584220cd6ec7830e24f790a6776ae581f3c027a4db5dca8735667b82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / dataframely-3.1.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | dataframely-3.1.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 8.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4099869e93dd6f89270e3153d5d57c57b70fdb0ee5bdabe2da75fcb3e9e3a3ca
|
|
BLAKE2b-256 checksum How to use checksums |
a9fbe0330e19d7d3e8ece05d5714ee4f716c5b7ede18432c1a0c7c79fec31422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / dataframely-3.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | dataframely-3.1.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 8.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2afe6aa8ab560f735c1d5eb2b1b86106a184db65859b71bd993001ffb2599711
|
|
BLAKE2b-256 checksum How to use checksums |
93d8afc9f53c3f533193f9e2de78e096fb281b1e3e0e3e47a0b4c78a72eef729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / dataframely-3.1.2-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | dataframely-3.1.2-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7c6e6fd641248ad0c109b11bc2ee6f3a18cb9a35d038770f8180a7fb3244a98f
|
|
BLAKE2b-256 checksum How to use checksums |
8fbc45d256444170490489fbf29f45e7624669d8e2892a9fd61dec196f689b61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / dataframely-3.1.2-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | dataframely-3.1.2-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c99fa0400555d24b4d2ebe365a3223efd3936b6c6fb8bc5e35445e3cc8bfbd8
|
|
BLAKE2b-256 checksum How to use checksums |
739f3b9e01d09883b34b00e9fe21ee8feb95f6610fa76331c84d6b4805474937
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log