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
pip install wedjat
The package is distributed as
wedjaton PyPI but imported asHorus.
Usage
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
Metadata
Release files for wedjat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wedjat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wedjat-0.1.0-py3-none-any.whl |
Release files / wedjat-0.1.0-py3-none-any.whl
| Download URL | wedjat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9bfebe0608422912d19c3d7c1d7be88cd8a9f87cef3d0279a19b9e220471228
|
|
BLAKE2b-256 checksum How to use checksums |
d0bcc00774e2dfaaf196f1c8f4d4af1335696af0c81c0cc46497f670273a7a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for wedjat 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.