Validatedata 0.3.0 – lightweight inline data validation for Python
Pydantic alternative for scripts and CLIs, but overlaps with existing inline validation approaches.

Pydantic alternative for when defining full model classes feels like overkill.
Python developers writing scripts, lightweight APIs, or CLI tools
Pydantic · Marshmallow · Cerberus
I've made an update to the library to add mirror-structure rules that literally resemble the shape of your data.
from validatedata import validate_data
data = { "user": { "name": "Alice", "email": "[email protected]", "profile": { "age": 28, "bio": " Python enthusiast ", "tags": ["dev", "python"] } } }
# Mirror rule – clean and readable rule = { "user": { "name": "str|min:3|max:50", "email": "email", "profile": { "age": "int|between:13,120", "bio": "str|strip|max:500", "tags": "list|unique|min:1" } } }
result = validate_data(data, rule, mutate=True)
if result.ok: print("Valid!") print(result.data) # With mutate=True you even get cleaned data back in the same shape else: print(result.errors)
Pydantic alternative for scripts and CLIs, but overlaps with existing inline validation approaches.
Inline validation without schema classes, but Pydantic already owns this space.
Rule-based function dispatching beats functools.singledispatch for complex validation logic.
ESLint for system design: catch architecture violations in CI before code review becomes bottleneck.
Finally forces AI agents to prove their work with real test gates instead of hallucinated confidence.
Converted SWIFT's prose rules to executable Python when MyStandards is clunky.