Registry / devops / validations-engine

validations-engine

JSON →
library2.0.0pypypi✓ verified 81d ago

Engine for creating and running validation suites for general purposes. Current version is 2.0.0, with a release cadence of minor updates every few months.

pip install validations-engine
INSTALL
IMPORT
SIG · VALIDATIONS-ENGINE
V
validations-engine
devopspythonv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ValidationEngine
import validations_engine
from validations_engine import ValidationEngine

Initialize engine, add a rule for age field, and validate a sample payload.

from validations_engine import ValidationEngine engine = ValidationEngine() engine.add_rule({'field': 'age', 'type': 'number', 'min': 0, 'max': 150}) result = engine.validate({'age': 25}) print(result.valid) # True
Debug
Known issues
breakingBreaking change from 1.x to 2.x: renamed ValidationResult.valid to ValidationResult.is_valid.
fix
Replace `result.valid` with `result.is_valid`.
affects: 2.0.0
gotchaRules' field names are case-sensitive; mismatch leads to False validations.
fix
Ensure field names in rules exactly match payload keys.
affects: >=2.0.0
deprecatedThe `load_rules_from_yaml` method is deprecated since 2.0.0. Use `load_rules_from_file` instead.
fix
Replace `engine.load_rules_from_yaml('rules.yaml')` with `engine.load_rules_from_file('rules.yaml')`.
affects: 2.0.0
Upgrade
Version history
2.0.0latest on PyPI · released Nov 16, 2023
Audit
Dependencies
pydanticrequiredUsed for data validation and settings management
pyyamloptionalOptional for YAML configuration files
Agent activity
17 hits · last 30 days
node
16
Resources
validations-engine — pip install validations-engine · libregistry