pydiverse.colspec
A data validation library that ensures type conformity of columns in SQL tables and polars data frames. It can also validate constraints regarding the data as defined in a so-called column specification provided by the user.
The purpose is to make data pipelines more robust by ensuring that data meets expectations and more readable by adding type hints when working with tables and data frames.
ColSpec is founded on the ideas of dataframely which does exactly the same but with focus on polars data frames. ColSpec delegates to dataframely in the back especially for features like sampling random input data conforming to a given column specification. dataframely uses the term schema as it is also used in the polars community. Since ColSpec also works with SQL databases where the term schema is used for a collection of tables, the term is avoided as much as possible. The term column specification means exactly the same but avoids the confusion.
Merit attribution
ColSpec is the brain child of dataframely. Large parts of the codebase is code duplicated from it. Unfortunately, integrating the SQL native validation into dataframely would have made it a less clean solution for people who just focus on Polars. Thus the decision was made to replicate the same functionality in the pydiverse library collection also with the benefit to enable smoother integration with other pydiverse libraries.
Usage
pydiverse.colspec can either be installed via pypi with pip install pydiverse-colspec or via
conda-forge with conda install pydiverse-colspec -c conda-forge. Our recommendation would be
to use pixi which is also based on conda-forge:
mkdir my_project
pixi init
pixi add pydiverse-colspec
With pixi, you run python like this:
pixi run python -c 'import pydiverse.colspec'
or this:
pixi run python my_script.py
Metadata
Release files for pydiverse-colspec 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| pydiverse_colspec-0.3.2.tar.gz | 37.2 kB | With provenance | Details for pydiverse_colspec-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydiverse_colspec-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for pydiverse_colspec-0.3.2-py3-none-any.whl |
Total release size: 93.6 kB
Release files / pydiverse_colspec-0.3.2.tar.gz
| Download URL | pydiverse_colspec-0.3.2.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e9fb108bbd0f237dca8f37312bc49ae8ba7a867ebb9d4eff59684d78af177f6
|
|
BLAKE2b-256 checksum How to use checksums |
c887f5b3f20fc1f023af8f25671c272d7b9c394e6782b764ec8a9617d0616186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jul 13, 2026.
Transparency logRelease files / pydiverse_colspec-0.3.2-py3-none-any.whl
| Download URL | pydiverse_colspec-0.3.2-py3-none-any.whl |
|---|---|
| Size | 56.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0002a655399cb075eb94357fbf97fee115623879a6a0dc033bfc2d149517d365
|
|
BLAKE2b-256 checksum How to use checksums |
dcaf8a584e7130339ff59a300b892306316d666a399854623fd5f09f71de394c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jul 13, 2026.
Transparency logSecurity for pydiverse-colspec 0.3.2
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
Both files in this release have been uploaded with provenance metadata.
Attestation for pydiverse_colspec-0.3.2.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 Jul 13, 2026.
Transparency logA 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.