Metadata-Version: 2.4
Name: pi-recipe-check
Version: 0.7.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Programming Language :: Rust
Classifier: Typing :: Typed
Summary: Python bindings for the I/O-free Pi recipe validation engine
Keywords: pi,recipes,validation,lint,agents
Home-Page: https://pi.recipes
Author: Introspection
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://pi.recipes
Project-URL: Issues, https://github.com/introspection-org/pi-recipes/issues
Project-URL: Repository, https://github.com/introspection-org/pi-recipes

# pi-recipe-check for Python

Native Python bindings for the pure, I/O-free
[`pi-recipe-check`](https://crates.io/crates/pi-recipe-check) validation engine.

```sh
uv add pi-recipe-check
```

```python
from pi_recipe_check import check_recipe_files

report = check_recipe_files(
    {
        "files": [
            {
                "path": "package.json",
                "content": '{"name":"demo","pi":{}}',
            }
        ],
        "directories": [],
    },
    profile="ci",
)

for diagnostic in report.diagnostics:
    print(diagnostic.code, diagnostic.path, diagnostic.message)
```

The snapshot represents the complete recipe tree. File paths are relative to
the recipe root and use `/` separators. Omit `content`, or set it to `None`,
when the file exists but its contents were not supplied. Ancestor directories
are inferred; `directories` is only needed for empty directories.

Invalid recipes return a `Report` with `valid=False`. Malformed input and
unknown validation profiles raise `ValueError`. The binding performs no
filesystem I/O and does not include the Rust crate's `fs` or `cli` features.
Direct-child `judges/*.yaml` and `judges/*.yml` content is validated through the
same core. Invalid judge content returns structured `judge.*` diagnostics; it
does not raise a content exception or return project-scoped judge identity.

## Development

```sh
uv sync --project bindings/python --locked
uv run --project bindings/python --locked ruff format --check bindings/python/python bindings/python/tests
uv run --project bindings/python --locked ruff check bindings/python/python bindings/python/tests
uv run --project bindings/python --locked mypy --strict bindings/python/python bindings/python/tests
uv run --project bindings/python --locked maturin develop --manifest-path bindings/python/Cargo.toml
uv run --project bindings/python --no-sync pytest bindings/python/tests
```

