pyvalid
The module, which allows easily validate function's input/output values.
What it is and what it does
pyvalid is a decorator-based validation library that enforces type and value constraints on function inputs and outputs at runtime. It allows you to annotate functions with expected argument types and return types, then automatically validates those constraints when the function is called, raising exceptions if validation fails.
The package depends only on six for Python 2/3 compatibility. It was last updated in October 2020 and has been abandoned since January 2021, meaning it receives no active maintenance or updates. While it carries a permissive MIT license and has low installation friction, its age and lack of maintenance create uncertainty about compatibility with recent Python versions and modern validation patterns.
Use it for:
- Add runtime type checking to legacy Python codebases without rewriting function signatures
- Catch type mismatches early during development and testing via decorator annotations
- Validate function outputs to ensure return values match expected types before use
- Debug data flow issues by instrumenting functions with automatic input/output validation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyvalid is a Python data validation tool that checks function input and output values, typically via decorators for runtime type and value validation.
No. While pyvalid is simple to install and permissively licensed, it has been abandoned for over three years with no maintenance. Modern Python projects should prefer actively maintained alternatives like pydantic, typeguard, or beartype, which offer better compatibility with current Python versions, richer validation features, and ongoing support. Use pyvalid only if you are maintaining legacy code that already depends on it.
Install
pyvalid on PyPI
pip
pip install pyvaliduv
uv add pyvalidpoetry
poetry add pyvalidInstalling pyvalid
Before you install
Installation is low-friction, but the package has been abandoned since January 2021 with no recent maintenance. The last release was over three years ago, so compatibility with modern Python versions and dependency updates is uncertain.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute pyvalid freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install pyvalid
from pyvalid import accepts, returns
@accepts(int, int)
@returns(int)
def add(a, b):
return a + b
result = add(2, 3)
Verify before relying
- Whether pyvalid works reliably with Python 3.10+ given the last release was October 2020
- Current state of the six dependency and whether it introduces compatibility issues
- Whether decorator-based validation is still the preferred pattern for modern validation use cases
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — six |
| Maintenance | abandoned — 2,131 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 456,926/month — #6,552 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyvalid-1.0.4-py3-none-any.whl
Keywords: pyvalid, valid, validation, type, checking, check, decorator, runtime, debug, test
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
openapi-spec-validatorValidates OpenAPI specifications (versions 2.0,…
permissive · top 1,000 on PyPI
argparseProvides command-line argument parsing for…
permissive · top 1,000 on PyPI
openapi-schema-validatorValidates data and schemas against OpenAPI…
permissive · top 1,000 on PyPI
validator-collectionProvides 60+ validator functions for checking…
permissive · top 15,000 on PyPI
typing-validationRuntime validation of Python objects against…
copyleft · top 15,000 on PyPI
pyinotifyMonitors Linux filesystem events (file…
permissive · top 5,000 on PyPI
statusA command-line tool that reports HTTP response…
permissive · top 15,000 on PyPI
certvalidatorValidates X.509 certificates and certificate…
permissive · top 15,000 on PyPI
strongtypingA runtime type-checking decorator that…
permissive · top 15,000 on PyPI
django-decorator-includeApplies decorators to Django URL patterns…
permissive · top 15,000 on PyPI