$npx skillfedfor your agent

pydantic-function-models

Migrating v1 Pydantic ValidatedFunction to v2.

With conditionsPyPI LibrariesReleased Apr 2026589.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pydantic_function_models-0.1.12-py3-none-any.whl
v0.1.12 · released 2026-04-16 · Python >=3.10 · 1 runtime deps: pydantic

Yes, if you are migrating from Pydantic v1's ValidatedFunction or need to model and validate function signatures as structured Pydantic models. The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Install friction is minimal. However, if you only need basic argument validation without signature introspection, Pydantic's validate_call decorator may be simpler.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; pydantic must be installed as the sole runtime dependency.
  • Low friction: pure Python wheel with a single runtime dependency on pydantic.
  • Actively maintained with a recent commit (2026-08-10) and no known vulnerabilities.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-04-16 (120 days) · last repo commit 2026-08-10 · 6 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 589,678 downloads/mo, #5,858 on PyPI

Verify before relying

from pydantic_function_models import ValidatedFunction

def add(a: int, b: int) -> int:
    return a + b

vf = ValidatedFunction(add)
validated = vf.model.model_validate({"a": 1, "b": 2})
result = add(**validated.model_dump(exclude_unset=True))
print(result)  # 3
  • Whether ValidatedFunction fully replicates Pydantic v1 behavior or has known gaps for complex signatures.
  • Performance characteristics when validating functions with many parameters or nested type hints.
  • Compatibility with Pydantic's validate_call decorator and how the two approaches differ in practice.
Same gist for agents: .md · .json

What it is and what it does

pydantic-function-models lets you wrap any Python function to enforce type validation on its arguments using Pydantic's validation engine. It builds an internal Pydantic model from the function's signature and type hints, then validates incoming arguments (positional or keyword) against that model before execution. The package was created to bridge the gap left by Pydantic v2's removal of ValidatedFunction from v1, offering a direct migration path for code that relied on that feature.

The library is designed for cases where you need to model and validate a function's full signature as a structured entity—distinct from Pydantic's validate_call decorator, which is simpler but less flexible for introspection. It includes safeguards against reserved parameter names that could conflict with internal validation logic, and raises clear Pydantic ValidationError messages when arguments don't match declared types.

Use it for

  • Migrating Pydantic v1 code that used ValidatedFunction to v2 without rewriting validation logic.
  • Building CLI tools or APIs that need to validate function arguments against strict type contracts before execution.
  • Introspecting and modeling function signatures as Pydantic models for serialization or schema generation.
  • Enforcing type safety in plugin systems or dynamic function dispatch where arguments come from untrusted sources.
  • Creating wrapper layers that log or audit function calls with validated, structured argument data.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are migrating from Pydantic v1's ValidatedFunction or need to model and validate function signatures as structured Pydantic models.

The package is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Install friction is minimal. However, if you only need basic argument validation without signature introspection, Pydantic's validate_call decorator may be simpler.

Install

pydantic-function-models on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency on pydantic. Actively maintained with a recent commit (2026-08-10) and no known vulnerabilities.

Requires Python 3.10 or later; pydantic must be installed as the sole runtime dependency.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

from pydantic_function_models import ValidatedFunction

def add(a: int, b: int) -> int:
    return a + b

vf = ValidatedFunction(add)
validated = vf.model.model_validate({"a": 1, "b": 2})
result = add(**validated.model_dump(exclude_unset=True))
print(result)  # 3

Verify before relying

  • Whether ValidatedFunction fully replicates Pydantic v1 behavior or has known gaps for complex signatures.
  • Performance characteristics when validating functions with many parameters or nested type hints.
  • Compatibility with Pydantic's validate_call decorator and how the two approaches differ in practice.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pydantic
MaintenanceActively maintained 120 days since the last release
Last repo commit
First released
Downloads589,678 / month, #5,858 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaFramework :: PydanticFramework :: Pydantic :: 2Intended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries

Evidence: pydantic_function_models-0.1.12-py3-none-any.whl

Tags

Capabilities
pydantic function argument validationvalidate function signatures pydanticpydantic v1 validatedfunction migrationfunction parameter type checkingpydantic function wrapperruntime argument validationfunction signature modeling
Topics
pydantic-v1-migrationtype-validationfunction-wrapping
PyPI keywords
pydanticserializationdeserializationparsing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pydantic function argument validation”

  • pydantic-function-modelsWraps Python functions to validate their arguments against type hints…
  • argdanticBuilds typed command-line interfaces by combining argparse with…
  • pydantic-argparseGenerates command-line argument parsers from Pydantic models,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also pydantic · django-pydantic-field · pydantic-compat · pydantic_core · backcall · drf-pydantic · jsonschema-pydantic-converter · python-flirt · Flask-Pydantic · pydantic-xml