Metadata-Version: 2.4
Name: wedjat
Version: 0.1.0
Summary: Horus is a recursive data-structure validator that walks nested dicts, lists, tuples and scalars and checks every node against rule sets of regex patterns, reporting compliance with human-readable messages and the exact path of each violation.
Author-email: Ahmed Kamal ELSaman <ak.elsaman@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/akelsaman/Horus
Project-URL: Repository, https://github.com/akelsaman/Horus
Keywords: validation,validator,schema,regex,data,nested
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
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: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Horus

Horus is a recursive data-structure validator. It walks nested dicts, lists, tuples and scalars and checks every node against rule sets of regex patterns, reporting compliance with human-readable messages and the exact path of each violation.

## Installation

```bash
pip install wedjat
```

> The package is distributed as `wedjat` on PyPI but imported as `Horus`.

## Usage

```python
from Horus import Horus, newType

validator_rules = {
    "name": {"first": "Empty,EnSmCp", "last": "Empty,EnSmCp"},
    "age": "Empty,Dg",
    "hoppies": [{"hoppy": "Empty,EnSmCp"}],
    "trips": ["Empty,EnSmCp"],
}

validator_input = {
    "name": {"first": "Ahmed", "last": "KamalELSaman"},
    "age": 35,
    "hoppies": [{"hoppy": "Cycle"}, {"hoppy": "Swim"}],
    "trips": ["Germany"],
}

Horus.eye(validator_rules, validator_input)
```

Each rule is a comma-separated list of rule names. The leading names are *refuse* patterns (input that matches is rejected) and the final name is the *accept* pattern (input that does not match is rejected). Rules are defined in `validator_rules.py` as `{name: {"pattern": ..., "message": ...}}`.

## License

MIT
