{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/22"}],"enrichment":{"capability":"Adds OpenAPI documentation generation and request/response validation to Flask applications using Pydantic models and Python annotations.","skillfed_tags":["openapi-generation","request-validation","flask-integration"],"use_cases":["Build a REST API with automatic OpenAPI documentation and request validation without writing separate spec files.","Validate incoming JSON payloads and query parameters against Pydantic models, returning 422 errors with detailed validation messages.","Generate interactive Swagger UI or Redoc documentation automatically from your Flask route annotations.","Enforce consistent request/response schemas across a Flask application using Pydantic's validation and serialization.","Add before/after hooks to validation to log failures, record metrics, or customize error responses per endpoint."],"what_it_does":"Flask Pydantic Spec is a library that integrates Pydantic validation and OpenAPI documentation generation into Flask applications. It lets you define request and response schemas using Pydantic models, then automatically validates incoming requests against those schemas and generates interactive API documentation (Redoc or Swagger UI). Instead of writing separate YAML specs or manual validation logic, you annotate your Flask route handlers with Pydantic models, and the library handles validation, error responses (422 on failure), and documentation generation.\n\nThe library depends on pydantic for schema definition and validation, and inflection for string transformations. It supports validation of query parameters, JSON bodies, headers, and cookies, plus response type declarations. When validation fails, it returns a 422 status with structured error details. You access validated data via a context object attached to the request, though you can also use Flask's standard request object. The library began as a fork of Spectree and aims to reduce boilerplate by combining documentation and validation in one annotation-driven interface.","worth_installing":"Yes, if you need OpenAPI documentation and Pydantic validation in Flask and can tolerate unclear licensing and aging maintenance. The library is low-friction to install and actively works with current Python versions (3.9\u20133.13), but verify the license status before use and be aware that the project shows limited community adoption (1 star, 262 days since last release). No known vulnerabilities."},"id":"flask-pydantic-spec","links":{"html":"https://skillfed.io/packages/flask-pydantic-spec","md":"https://skillfed.io/packages/flask-pydantic-spec.md","pypi":"https://pypi.org/project/flask-pydantic-spec/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-25","license_spdx":null,"license_treatment":"unclear","name":"flask-pydantic-spec","python_support":"supports_current","summary":"generate OpenAPI document and validate request & response with Python annotations."},"popularity":{"monthly_downloads":77274,"position":14542,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.8.7"}
