{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/4"}],"enrichment":{"capability":"Converts pydantic models into partial variants where all or selected fields become optional, enabling flexible validation for PATCH requests and partial response DTOs.","skillfed_tags":["pydantic-extension","api-dto","patch-requests"],"use_cases":["Handle PATCH HTTP requests where only some fields are provided and should not trigger validation errors for missing required fields.","Create response DTOs that omit certain fields without raising validation errors when combined with exclude_none.","Build flexible API request/response models that adapt field optionality based on use case without duplicating model definitions.","Support partial updates in database operations where only changed fields need to be validated and persisted.","Generate test fixtures and mock objects where you need to construct models with minimal required data."],"what_it_does":"pydantic-partial is a mixin and utility library that generates optional variants of pydantic models. It lets you take a normal pydantic BaseModel and create a version where all fields, or just selected ones, become optional and accept None values. This is particularly useful for API endpoints handling PATCH requests, where clients only send fields they want to update, or for response DTOs where you want to omit certain fields without validation errors.\n\nThe library provides two main interfaces: a PartialModelMixin you can inherit from, and a standalone create_partial_model() function for models you don't control. It also supports recursive partials for nested model structures. The tradeoff is that type checkers cannot see the optionality changes\u2014partial models appear to type checkers as identical to their originals\u2014so the library is best suited for API data-transfer scenarios rather than complex type-aware logic.","worth_installing":"Yes, if you are building APIs with pydantic and FastAPI. The library solves a real gap in pydantic's design for PATCH requests and partial responses. Install friction is negligible, maintenance is active, and the MIT license carries no restrictions. The main caveat is that type checkers will not understand the partial optionality, so use it only for DTO/serialization contexts, not for type-critical business logic."},"id":"pydantic-partial","links":{"html":"https://skillfed.io/packages/pydantic-partial","md":"https://skillfed.io/packages/pydantic-partial.md","pypi":"https://pypi.org/project/pydantic-partial/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-26","license_spdx":"MIT","license_treatment":"permissive","name":"pydantic-partial","python_support":"supports_current","summary":"Create partial models from your pydantic models. Partial models may allow None for certain or all fields."},"popularity":{"monthly_downloads":194591,"position":9830,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.11.1"}
