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

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.3
File Size Uploaded Provenance Actions
dataframely-3.1.3.tar.gz 440.0 kB With provenance Details for dataframely-3.1.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for dataframely 3.1.3
File Actions
dataframely-3.1.3-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for dataframely-3.1.3-cp311-abi3-win_amd64.whl
dataframely-3.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for dataframely-3.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
dataframely-3.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for dataframely-3.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
dataframely-3.1.3-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for dataframely-3.1.3-cp311-abi3-macosx_11_0_arm64.whl
dataframely-3.1.3-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for dataframely-3.1.3-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 43.7 MB

Release files / dataframely-3.1.3.tar.gz

Download URL dataframely-3.1.3.tar.gz
Size 440.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3cac894dfd7f7c00045bee2c1261b8c248aeab8bc0813a3c543e1147721dfbaa
BLAKE2b-256 checksum
How to use checksums
bb2c62d44102cc5c64ffef897ff640080fa4e8e621715de18291d74c26cae849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / dataframely-3.1.3-cp311-abi3-win_amd64.whl

Download URL dataframely-3.1.3-cp311-abi3-win_amd64.whl
Size 9.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
77dc45ca186e5c9402ebf099801e8b00d666e0371f70e9b0ac8f5a740beb39a1
BLAKE2b-256 checksum
How to use checksums
acc0886c192f8874fd6b946d7810de5e4757d6b3bc4f6a1a16234b0e83cf07d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / dataframely-3.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL dataframely-3.1.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 9.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
93a7c22d1184c85efa5936e7abb14e9c40a70831ae49cc02f5f2d410db72bb22
BLAKE2b-256 checksum
How to use checksums
71cc86acceace55f38a9e558773b21b6ff934caa57cdee5c578b36411101dc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / dataframely-3.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL dataframely-3.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 8.4 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
5504d993f7af4c0523a1c1143413b2b76595b5e45b22f0b0948d9198f9415bab
BLAKE2b-256 checksum
How to use checksums
7f69d541aa7bf803a724a8143f2e707433265bb5e1203c60cc1ceb004595157a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / dataframely-3.1.3-cp311-abi3-macosx_11_0_arm64.whl

Download URL dataframely-3.1.3-cp311-abi3-macosx_11_0_arm64.whl
Size 8.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d3a5da1e97a802a9d3ab14b02ee16764c2c836cb3b6b904f4401146b92761ea8
BLAKE2b-256 checksum
How to use checksums
af7ab483fbdcebf9587e339d2b398c7ded9fb9dfe83a865d0f877d35629c6da4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / dataframely-3.1.3-cp311-abi3-macosx_10_12_x86_64.whl

Download URL dataframely-3.1.3-cp311-abi3-macosx_10_12_x86_64.whl
Size 8.6 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
67db912b7d95a511913652e60f07ba48e1ec8aa2aebaf37b626af6fd21aceb3b
BLAKE2b-256 checksum
How to use checksums
4b82cc2cc54102ff1b75ee33b70b58b95db6ea18254cbe8f6174de5a175cefb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for dataframely 3.1.3

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for dataframely-3.1.3.tar.gz

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 Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.1.3 This release

6 release files Full provenance

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