Skip to main content

dataframely — A declarative, 🐻‍❄️-native data frame validation library

CI Nightly CI conda-forge pypi-version python-version codecov

🗂 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dataframely 3.1.0
File Size Uploaded
dataframely-3.1.0.tar.gz 435.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dataframely 3.1.0
File
dataframely-3.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
dataframely-3.1.0-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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
dataframely-3.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
dataframely-3.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 42.4 MB

Release files / dataframely-3.1.0.tar.gz

Download URL dataframely-3.1.0.tar.gz
Size 435.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eb3257b2d33351fecf04cfc6adf65584157d812e615f4e9c934f05359a423072
BLAKE2b-256 checksum
How to use checksums
dc8f00d87768ad79d383968ab7190b70e2e393fbc9c8aade264f12dcade39877
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 16, 2026.

Transparency log

Release files / dataframely-3.1.0-cp310-abi3-win_amd64.whl

Download URL dataframely-3.1.0-cp310-abi3-win_amd64.whl
Size 8.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f692539d0c56b7beff3e565deeb18d466ba9ce1f6505a96c75e91bb5af541533
BLAKE2b-256 checksum
How to use checksums
1681358373590e603da38ffafbf24e83bdecf030de5d60be3da8cea638dd8e5b
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 16, 2026.

Transparency log

Release files / dataframely-3.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL dataframely-3.1.0-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
9489793cb7a56db27614137f2d72cbaa66731dc90c8ff71e32872272c7104a0b
BLAKE2b-256 checksum
How to use checksums
eb783ae111fbdbde6d318f33251e5b0eeef96565ccc49e7f08a75b9a36fb0c83
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 16, 2026.

Transparency log

Release files / dataframely-3.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL dataframely-3.1.0-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
c94fe08bc4ea515f0309d7d0b3c477a727810d619d6b11a3ded86135ef5c09df
BLAKE2b-256 checksum
How to use checksums
29d37b976f38222f03f891618863d666e7bd7405b61d68ea23c8d491a68a1912
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 16, 2026.

Transparency log

Release files / dataframely-3.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL dataframely-3.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 7.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7b82c725adf070aa4341b9a3e99a4ad5ed896969571f6192528b4147f7c63b5c
BLAKE2b-256 checksum
How to use checksums
fc3fee0008d5b6ffec4f9c17cb757586022fd594a60e6582ba5a186454e13429
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 16, 2026.

Transparency log

Release files / dataframely-3.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL dataframely-3.1.0-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
f340d4041caf4b287aa10450e03cc2a321b9f14f789e2e1df208f809d6d655bb
BLAKE2b-256 checksum
How to use checksums
fff82f64afcb356a9220bfec25e88ab2423da3bf005539c34a664ad1b96ad3c6
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 16, 2026.

Transparency log

Release history Release notifications | RSS feed

3.1.2

6 release files

3.1.1

6 release files

This release

3.1.0 This release

6 release files

3.0.0

6 release files

2.13.2

6 release files

2.13.1

6 release files

2.10.1

6 release files

2.9.1

6 release files

2.9.0

6 release files

2.8.2

6 release files

2.8.1

6 release files

2.8.0

6 release files

2.7.0

6 release files

2.6.0

6 release files

2.5.1

6 release files

2.5.0

6 release files

2.4.0

6 release files

2.3.1

6 release files

2.3.0

6 release files

2.2.0

6 release files

2.1.0

6 release files

2.0.0

6 release files

1.13.0

6 release files

1.12.1

6 release files

1.12.0

6 release files

1.9.0

6 release files

1.8.2

6 release files

1.8.1

6 release files

1.8.0

6 release files

1.7.6

6 release files

1.7.5

6 release files

1.7.4

6 release files

1.7.3

6 release files

1.7.2

6 release files

1.7.1

6 release files

1.7.0

6 release files

1.6.0

6 release files

1.5.0

6 release files

1.4.0

6 release files

1.3.1

6 release files

1.3.0

6 release files

1.2.1

6 release files

1.2.0

6 release files

1.1.0

6 release files

1.0.0

6 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page