pydiverse-colspec


Namepydiverse-colspec JSON
Version 0.2.5 PyPI version JSON
download
home_pageNone
SummaryValidate column specifications and constraints for SQL tables and polars data frames.
upload_time2025-07-11 16:35:38
maintainerNone
docs_urlNone
authorQuantCo, Inc.
requires_python<3.14,>=3.11
licenseBSD 3-Clause License Copyright (c) 2022, pydiverse All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydiverse.colspec

[![CI](https://github.com/pydiverse/pydiverse.colspec/actions/workflows/tests.yml/badge.svg)](https://github.com/pydiverse/pydiverse.colspec/actions/workflows/tests.yml)

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](https://github.com/Quantco/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](https://github.com/Quantco/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`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pydiverse-colspec",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "QuantCo, Inc.",
    "author_email": "Martin Trautmann <windiana@users.sf.net>, Finn Rudolph <finn.rudolph@t-online.de>",
    "download_url": "https://files.pythonhosted.org/packages/a6/e8/59eabcb859f838aae614371d4ba5c5aec30a9642f5449a77b1ceb968475e/pydiverse_colspec-0.2.5.tar.gz",
    "platform": null,
    "description": "# pydiverse.colspec\n\n[![CI](https://github.com/pydiverse/pydiverse.colspec/actions/workflows/tests.yml/badge.svg)](https://github.com/pydiverse/pydiverse.colspec/actions/workflows/tests.yml)\n\nA data validation library that ensures type conformity of columns in SQL tables and polars data frames.\nIt can also validate constraints regarding the data as defined in a so-called column specification provided\nby the user.\n\nThe purpose is to make data pipelines more robust by ensuring that data meets expectations and more readable by adding\ntype hints when working with tables and data frames.\n\nColSpec is founded on the ideas of [dataframely](https://github.com/Quantco/dataframely) which does exactly the same but\nwith focus on polars data frames. ColSpec delegates to dataframely in the back especially for features like sampling random\ninput data conforming to a given column specification. dataframely uses the term schema as it is also used in the polars\ncommunity. Since ColSpec also works with SQL databases where the term schema is used for a collection of tables, the\nterm is avoided as much as possible. The term column specification means exactly the same but avoids the confusion.\n\n## Merit attribution\n\nColSpec is the brain child of [dataframely](https://github.com/Quantco/dataframely). Large parts of the codebase is code\nduplicated from it. Unfortunately, integrating the SQL native validation into dataframely would have made it a less clean\nsolution for people who just focus on Polars. Thus the decision was made to replicate the same functionality in the\npydiverse library collection also with the benefit to enable smoother integration with other pydiverse libraries.\n\n## Usage\n\npydiverse.colspec can either be installed via pypi with `pip install pydiverse-colspec` or via\nconda-forge with `conda install pydiverse-colspec -c conda-forge`.\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License\n        \n        Copyright (c) 2022, pydiverse\n        All rights reserved.\n        \n        Redistribution and use in source and binary forms, with or without\n        modification, are permitted provided that the following conditions are met:\n        \n        1. Redistributions of source code must retain the above copyright notice, this\n           list of conditions and the following disclaimer.\n        \n        2. Redistributions in binary form must reproduce the above copyright notice,\n           this list of conditions and the following disclaimer in the documentation\n           and/or other materials provided with the distribution.\n        \n        3. Neither the name of the copyright holder nor the names of its\n           contributors may be used to endorse or promote products derived from\n           this software without specific prior written permission.\n        \n        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "Validate column specifications and constraints for SQL tables and polars data frames.",
    "version": "0.2.5",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5933140ff426ffe5196b011f21d512cc7d0bb597a113c65ec058de3657b005d7",
                "md5": "6c35e0f4bdca7479bf63aa23db5956d3",
                "sha256": "5241f36b85f8f4e2a97867129bcf73d490a6c7aa999d8ab3851a89c661ba724e"
            },
            "downloads": -1,
            "filename": "pydiverse_colspec-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c35e0f4bdca7479bf63aa23db5956d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.11",
            "size": 52712,
            "upload_time": "2025-07-11T16:35:36",
            "upload_time_iso_8601": "2025-07-11T16:35:36.674632Z",
            "url": "https://files.pythonhosted.org/packages/59/33/140ff426ffe5196b011f21d512cc7d0bb597a113c65ec058de3657b005d7/pydiverse_colspec-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a6e859eabcb859f838aae614371d4ba5c5aec30a9642f5449a77b1ceb968475e",
                "md5": "8315b166e4b8cac172a61cdf8fcbc8fb",
                "sha256": "719bdf5edaa57d112c8c67690aaed8bd53a32c6420eeeebf76104e797e20d035"
            },
            "downloads": -1,
            "filename": "pydiverse_colspec-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8315b166e4b8cac172a61cdf8fcbc8fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.11",
            "size": 313686,
            "upload_time": "2025-07-11T16:35:38",
            "upload_time_iso_8601": "2025-07-11T16:35:38.132563Z",
            "url": "https://files.pythonhosted.org/packages/a6/e8/59eabcb859f838aae614371d4ba5c5aec30a9642f5449a77b1ceb968475e/pydiverse_colspec-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-11 16:35:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pydiverse-colspec"
}
        
Elapsed time: 0.43463s