Metadata-Version: 2.4
Name: paguro
Version: 0.3.0
Summary: Data validation and manipulation using Polars
Author-email: Bernardo Dionisi <bernardo.dionisi@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/bernardodionisi/paguro
Project-URL: Source, https://github.com/bernardodionisi/paguro
Project-URL: Issues, https://github.com/bernardodionisi/paguro/issues
Project-URL: Documentation, https://bernardodionisi.github.io/paguro/latest/
Keywords: data science,data quality,data engineering,polars,metadata,validation,summary statistics,deferred pipelines
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: polars>=1.32.0
Requires-Dist: typing_extensions>=4.0.0; python_version < "3.11"
Provides-Extra: extra
Requires-Dist: numpy>=1.23.0; extra == "extra"
Requires-Dist: rich; extra == "extra"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Requires-Dist: nox; extra == "test"
Provides-Extra: lint
Requires-Dist: ruff==0.9.2; extra == "lint"
Provides-Extra: typing
Requires-Dist: mypy; extra == "typing"
Provides-Extra: docs
Requires-Dist: sphinx-tutorials==0.0.7; extra == "docs"
Dynamic: license-file

# `Paguro`: data validation using Polars

<p align="center">
  <img src="./docs/imgs/logo/logo-paguro.png" alt="Paguro Logo" width="50%">
</p>


`Paguro` is a Python library built on top Polars that provides efficient and rich tools for:

- Data **validation** and **models**
- Persistent custom **information**
- Customizable **summary statistics**
- And much more!

*All with informative and beautiful terminal output!*

---

- ➪ [Documentation](https://bernardodionisi.github.io/paguro/latest/)
    - ➪ [API reference](https://bernardodionisi.github.io/paguro/latest/)

## Installation

`pip install paguro`

## Quick Start

### Data Validation

#### Expressive API

`Paguro` introduces a new expressive API for defining validation

Here is a basic example of what it looks like:

```python
import paguro as pg
import polars as pl

valid_frame = pg.vframe(
    pg.vcol("a", dtype=int, ge=1),
    pg.vcol("b", b_contains=pl.all().str.contains("z")),
)

valid_frame.validate({"a": [0, 1, 2], "b": ["z", "y", "x"]})
```

```text
══ ValidationError ═══════════════════════════════
 ━━━━━━━━━━━━━━━ valid_frame_list ━━━━━━━━━━━━━━━ 
  ╭─ > "" ─────────────────────────────────────╮  
  │ ----------------------------- validators - │  
  │   valid_column_list                        │  
  │     * 'a'                                  │  
  │       constraints                          │  
  │         ‣ ge                               │  
  │           errors                           │  
  │             ┌─────┐                        │  
  │             │ a   │                        │  
  │             │ --- │                        │  
  │             │ i64 │                        │  
  │             ╞═════╡                        │  
  │             │ 0   │                        │  
  │             └─────┘                        │  
  │             shape: (1, 1)                  │  
  │     * 'b'                                  │  
  │       constraints                          │  
  │         ‣ b_contains                       │  
  │           errors                           │  
  │             ┌─────┐                        │  
  │             │ b   │                        │  
  │             │ --- │                        │  
  │             │ str │                        │  
  │             ╞═════╡                        │  
  │             │ y   │                        │  
  │             │ x   │                        │  
  │             └─────┘                        │  
  │             shape: (2, 1)                  │  
  │                                            │  
  ╰────────────────────────────────────────────╯  
                                                  
══════════════════════════════════════════════════
```

Paguro contains many features, including a model-based API for validation and static typing of
columns, please visit the [Documentation](https://bernardodionisi.github.io/paguro/latest/) and
stay tuned for more examples!

---

**Paguro** is distributed under the [Apache License, Version 2.0](https://spdx.org/licenses/Apache-2.0.html).  
&copy; 2025 Bernardo Dionisi | SPDX-License-Identifier: Apache-2.0
