Clear Examples; # Single File: from decimal import Decimal from validatedata import autovalidate # custom type checker for decimals def is_decimal(v): return isinstance(v, Decimal) # add at the bottom of a file you want to auto-validate autovalidate( module="my_project.my_module", type_checkers={Decimal: is_decimal}, # custom checkers raise_exceptions=True, # raise on failure enforce_hints=False, # require type hints on all functions # decorator=my_custom_decorator, # optional: use your own decorator ) # Entire Package: from validatedata import autovalidate_package report = autovalidate_package( package="my_project", include=[ "my_project.*" ], # only modules under my_project exclude=[ "my_project.tests.*" ], # skip tests # dry_run=True, ) # Uncomment dry_run=True plus the print below to see what would be auto-validated. # print(report["decorated"])
Open pypi.orgpypi.org/project/validatedata
validatedata
A Python package for automatically validating Python packages.
Visit project- First shared
- Jun 18, 2026
- HN activity
- 23
Show HN@EdwardK1Jun 18, 2026
Show HN: Automatically Validate Python Packages
Community