skillfed

pyvalid

The module, which allows easily validate function's input/output values.

pyvalid v1.0.4 456.9K downloads/30d#6,552 on PyPI33
Permissive license MIT Abandoned released

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 pyvalid

uv

uv add pyvalid

poetry

poetry add pyvalid

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.0Programming Language :: Python :: 3.1Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: DebuggersTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: TestingTopic :: Utilities

Tags

function input validation decoratorruntime type checking pythondata validation toolfunction output validationparameter type checking
decorator-basedabandoned

More Libraries packages