voluptuous-openapi
Convert voluptuous schemas to OpenAPI Schema object
What it is and what it does
Voluptuous OpenAPI bridges validation and API documentation by translating Voluptuous schemas—which define input validation rules—into OpenAPI 3.0 Schema objects. This eliminates the need to maintain separate schema definitions for validation and documentation; a single Voluptuous schema can drive both runtime validation and OpenAPI spec generation. The package maps Voluptuous validators (like Length, Range, Coerce) to their OpenAPI equivalents (minLength, minimum, type), preserving field descriptions and required/optional status.
The conversion is straightforward for standard validators but extensible: you can provide a custom serializer function to handle domain-specific validators that the package doesn't recognize natively. The library is lightweight, depending only on Voluptuous itself, and is actively maintained with no known security issues.
Use it for:
- Generate OpenAPI documentation automatically from Voluptuous validation schemas in FastAPI or Flask applications.
- Maintain a single source of truth for input validation and API contract documentation.
- Extend API documentation tooling to projects already using Voluptuous for request/response validation.
- Convert custom Voluptuous validators to OpenAPI constraints using a custom serializer function.
- Reduce manual schema duplication when building REST APIs with strict validation requirements.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Voluptuous validation schemas into OpenAPI 3.0 Schema objects, enabling automated API documentation generation from your validation rules.
Yes, if you use Voluptuous for validation and need OpenAPI documentation. The package is actively maintained, has no security issues, and low install friction. It solves a real problem—keeping validation and documentation in sync—with a clean, extensible design. Skip it if you don't use Voluptuous or don't need OpenAPI output.
Install
voluptuous-openapi on PyPI
pip
pip install voluptuous-openapiuv
uv add voluptuous-openapipoetry
poetry add voluptuous-openapiInstalling voluptuous-openapi
Before you install
Low friction: pure Python wheel with a single runtime dependency (voluptuous). Last release 49 days ago with active maintenance status and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install voluptuous-openapi
from voluptuous_openapi import convert
import voluptuous as vol
schema = vol.Schema({vol.Required('name'): str})
openapi_schema = convert(schema)
Requires Python 3.9 or later.
Verify before relying
- Whether custom serializers handle all common Voluptuous validators or only a subset.
- Performance characteristics when converting large or deeply nested schemas.
- Compatibility with specific Voluptuous versions beyond the runtime dependency declaration.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — voluptuous |
| Maintenance | actively maintained — 49 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 631,329/month — #5,659 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: voluptuous_openapi-0.4.1-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
voluptuous-serializeConverts Voluptuous schema objects into…
permissive · top 15,000 on PyPI
voluptuousVoluptuous validates Python data structures…
permissive · top 5,000 on PyPI
openapi-schema-validatorValidates data and schemas against OpenAPI…
permissive · top 1,000 on PyPI
apispec-oneofschemaExtends apispec to generate OpenAPI 3.0+…
permissive · top 15,000 on PyPI
drf-spectacularGenerates OpenAPI 3.0.3, 3.1, and 3.2 schemas…
permissive · top 5,000 on PyPI
jsonschema-pydanticConverts JSON Schema definitions into Pydantic…
unclear · top 15,000 on PyPI
jsonschema-pydantic-converterConverts JSON Schema definitions to Pydantic v2…
permissive · top 15,000 on PyPI
apispecGenerates OpenAPI specification documents from…
permissive · top 5,000 on PyPI
openapi-schema-pydanticProvides Pydantic classes that map to the…
permissive · top 5,000 on PyPI