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.1

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.1
File Size Uploaded
dataframely-3.1.1.tar.gz 435.3 kB Details

Built distributions (wheels)

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

Download URL dataframely-3.1.1.tar.gz
Size 435.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dfe4d89e3f835545c820e5540b84693bb19ad6728178bc1bd007490e78b29d5a
BLAKE2b-256 checksum
How to use checksums
1f1ae17e5b25c28283d761dcf44ff7d14dff638acf4eb05def670f00454c25e7
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 18, 2026.

Transparency log

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

Download URL dataframely-3.1.1-cp310-abi3-win_amd64.whl
Size 8.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e7ba09a23738bf0eeeffeffa13f4813e548cd6d44bfa61502eb2ebeabfee3cfe
BLAKE2b-256 checksum
How to use checksums
86caa476767fdd8b0e6a04448275d0fcbafa037d534459725e88e144b133a89f
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 18, 2026.

Transparency log

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

Download URL dataframely-3.1.1-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
26db63d73c54a0b7d923f9bad5ac5ccfe64cada9662f989ad742dbb21ad92eb6
BLAKE2b-256 checksum
How to use checksums
b162d0cf92c63ab7bdf112246f3ff70687f5abdbcff55095c74c86eacf9d8eaa
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 18, 2026.

Transparency log

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

Download URL dataframely-3.1.1-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
8214942db154548ba64755c1ed6bc92556ab7a58c7eef3c03a9321b86fa1bfc2
BLAKE2b-256 checksum
How to use checksums
e96c81e04bd72bba5a54766b1f7552887b8a95eef7af4dd4c19f72623b5b0236
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 18, 2026.

Transparency log

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

Download URL dataframely-3.1.1-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
b6fac1d964b1bca7d7720bee20f928958c4c61d21f918598f45fe0b680613ed0
BLAKE2b-256 checksum
How to use checksums
69fc5f2d9cacbfd372b38fd5fac76d24a1e82bee22cc87d0cf5726321c892d11
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 18, 2026.

Transparency log

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

Download URL dataframely-3.1.1-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
fa89548bee4cde0a6e5666782615bac211dc0bcd736a793ae78be39806fe7032
BLAKE2b-256 checksum
How to use checksums
4b7d0c676349ae884fbca096afc99a7cc6885321a9a12c64a8b78dea62a96d63
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

3.1.2

6 release files

This release

3.1.1 This release

6 release files

3.1.0

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