Skip to main content

Data validation and manipulation using Polars

Project description

Paguro: data validation using Polars

Paguro Logo

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!


Installation

pip install paguro

Quick Start

Data Validation

Expressive API

Paguro introduces a new expressive API for defining validation

Here is a simple example:

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"]})
══ 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 and stay tuned for more examples!


Paguro is distributed under the Apache License, Version 2.0.
© 2025 Bernardo Dionisi | SPDX-License-Identifier: Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paguro-0.3.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paguro-0.3.1-py3-none-any.whl (297.2 kB view details)

Uploaded Python 3

File details

Details for the file paguro-0.3.1.tar.gz.

File metadata

  • Download URL: paguro-0.3.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for paguro-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c0d6f00a1feb0f842a5b84f81d6a4061e7fcee0c769d9ee61e02f757c8e965be
MD5 6425851b2c3bfb166ff5f6bc1a11eeb2
BLAKE2b-256 b138b83b7a2ecf087adef6d7753c0a951743dff2000515731362f203a898ed0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for paguro-0.3.1.tar.gz:

Publisher: release.yaml on bernardodionisi/paguro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file paguro-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: paguro-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 297.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for paguro-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6485f4679b6db178ed5153efaf89dc31c2b2f71c98686129946db021ad46a8
MD5 347f823a00b7b7cbf340854e8de8eb4e
BLAKE2b-256 e6eef39e19e79f5a57775ab923275c89c7a7d014fec2e2237464c0fd9587482c

See more details on using hashes here.

Provenance

The following attestation bundles were made for paguro-0.3.1-py3-none-any.whl:

Publisher: release.yaml on bernardodionisi/paguro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page