{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/5"}],"enrichment":{"capability":"Wraps Python functions to validate their arguments against type hints using Pydantic models, providing a migration path from Pydantic v1's deprecated ValidatedFunction.","skillfed_tags":["pydantic-v1-migration","type-validation","function-wrapping"],"use_cases":["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."],"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.\n\nThe library is designed for cases where you need to model and validate a function's full signature as a structured entity\u2014distinct 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.","worth_installing":"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."},"id":"pydantic-function-models","links":{"html":"https://skillfed.io/packages/pydantic-function-models","md":"https://skillfed.io/packages/pydantic-function-models.md","pypi":"https://pypi.org/project/pydantic-function-models/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-16","license_spdx":null,"license_treatment":"permissive","name":"pydantic-function-models","python_support":"supports_current","summary":"Migrating v1 Pydantic ValidatedFunction to v2."},"popularity":{"monthly_downloads":589678,"position":5858,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.12"}
