{"categories":[{"label":"Code Generators","url":"https://skillfed.io/packages/category/software-development-code-generators"}],"enrichment":{"capability":"A CLI tool that automatically refactors Pydantic V1 code to V2 by applying targeted transformation rules to imports, field definitions, validators, and configuration patterns.","skillfed_tags":["pydantic-migration","code-refactoring","cli-tool"],"use_cases":["Bulk-migrate a Pydantic V1 codebase to V2 by running the tool on your package directory and reviewing the generated diff.","Automate replacement of Config classes with model_config and Field parameter updates across multiple files.","Convert V1 validators (@validator, @root_validator) to their V2 equivalents (@field_validator, @model_validator) in one pass.","Replace constraint functions (constr, conint, etc.) with Annotated type hints across a large project.","Identify and mark custom type methods (__get_validators__, __modify_schema__) that require manual V2 migration with TODO comments."],"what_it_does":"Bump Pydantic is a command-line tool that automates the migration of Pydantic V1 code to V2 by applying nine transformation rules (BP001\u2013BP009). It handles common refactoring tasks such as replacing the Config class with model_config, updating Field parameters, converting validators to their V2 equivalents, and replacing deprecated constraint functions with Annotated types. The tool uses libcst for safe AST-based code transformation and provides a --diff flag to preview changes before applying them.\n\nThe tool is designed for developers maintaining Pydantic V1 projects who need to upgrade to V2 but face large codebases where manual refactoring is impractical. It covers the majority of straightforward migration patterns, though complex custom types and protocol functions may require manual follow-up (flagged with TODO comments). The project is archived and no longer actively maintained, so it will not evolve with future Pydantic V2 releases.","worth_installing":"Yes, if you have a Pydantic V1 codebase to migrate and need to automate routine refactoring tasks. The tool handles the majority of straightforward patterns and is low-friction to install. However, be aware that the project is archived and no longer maintained\u2014it will not adapt to new Pydantic V2 features or Python versions, and complex migrations may still require manual work. Use it as a starting point rather than a complete solution."},"id":"bump-pydantic","links":{"html":"https://skillfed.io/packages/bump-pydantic","md":"https://skillfed.io/packages/bump-pydantic.md","pypi":"https://pypi.org/project/bump-pydantic/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2023-12-28","license_spdx":null,"license_treatment":"permissive","name":"bump-pydantic","python_support":"supports_current","summary":"Convert Pydantic from V1 to V2 \u267b"},"popularity":{"monthly_downloads":229283,"position":9134,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.8.0"}
