- Source: GitHub repository
- Documentation: DataGuard documentation
- Changelog: CHANGELOG.md
DataGuard supports Python 3.10 and later.
- Flexible validation checks: Define simple checks using built-in commands (equality, comparisons, nullability, etc.)
- Complex check expressions: Combine multiple checks with conjunctions (
and), disjunctions (or), and conditionals (when-then) - N-ary expressions: Support for 2 or more expressions in conjunction/disjunction operations (v0.5.0+)
- Nested expressions: Compose complex conditions by nesting check expressions
- Custom validation functions: Define your own validation logic following the framework's signature pattern
- DataFrame-level checks: Apply validations across entire dataframes or specific column groups
- Config-based filtering: Filter rows and columns using the same expression notation as checks — simple predicates or compound conjunctions/disjunctions/conditionals
- Detailed error reporting: Collect and format validation errors with custom messages and severity levels
- Polars support: Built on Polars for efficient data processing at scale
The package is published on PyPI as peh-dataguard and imported as
dataguard.
For a uv-managed project, add DataGuard as a dependency:
uv add peh-dataguardTo install it into the current environment without changing a project file:
uv pip install peh-dataguardCreate and activate a virtual environment, then install the package:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install peh-dataguardOn Windows PowerShell, activate the environment with
.venv\Scripts\Activate.ps1 instead of source.
Verify that the public API can be imported:
python -c "from dataguard import Filter, Validator; print('DataGuard is ready')"For a uv-managed project, use uv run python ... instead of python ....
For a source checkout, install the development dependencies with Python 3.14:
git clone https://github.com/eu-parc/dataguard.git
cd dataguard
uv sync --python 3.14Run the project checks with:
make test
make lint
make formatTo preview the Zensical documentation locally:
make serve