Back to browse
Validatedata 0.4 – validation rules for Python that resemble your data

Validatedata 0.4 – validation rules for Python that resemble your data

by EdwardK1·Mar 17, 2026·1 point·0 comments

AI Analysis

MidCozy

Pydantic alternative for when defining full model classes feels like overkill.

Strengths
  • Mirror-structure rules literally resemble your data shape — readable and intuitive
  • validate_types decorator works with Python type annotations without brackets
  • Explicitly positions itself as different tool, not Pydantic competitor
Weaknesses
  • Validation libraries are crowded — Pydantic, Marshmallow, Cerberus dominate
  • 4 stars, 0 forks — no evidence of real-world adoption or battle testing
Target Audience

Python developers writing scripts, lightweight APIs, or CLI tools

Similar To

Pydantic · Marshmallow · Cerberus

Post Description

https://pypi.org/project/validatedata/ https://github.com/Edward-K1/validatedata https://validatedata.readthedocs.io

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)

Similar Projects