skillfed

quart-schema

A Quart extension to provide schema validation

quart-schema v0.24.0 234.0K downloads/30d#9,030 on PyPI
Permissive license MIT Active released

What it is and what it does

Quart-Schema is a Quart extension that layers schema validation and automatic API documentation onto async web applications. It decorates route handlers with validators for query strings, request bodies, and responses, using either msgspec or pydantic as the validation backend. The extension automatically generates OpenAPI-compliant documentation served at standard endpoints (swagger UI at /docs, redoc at /redocs, Scalar at /scalar, and raw JSON at /openapi.json), making it straightforward to document and validate RESTful APIs without manual schema management.

The package is designed for developers building async REST APIs with Quart who want schema enforcement and self-documenting endpoints without boilerplate. It handles both HTTP request/response validation and WebSocket message validation through dedicated methods. With low install friction (three dependencies: pyhumps, quart, and typing_extensions) and active maintenance, it integrates cleanly into existing Quart projects.

Use it for:

  • Validate incoming JSON payloads and query parameters in REST endpoints using decorators
  • Auto-generate Swagger UI and OpenAPI documentation from dataclass or pydantic schemas
  • Enforce type safety on WebSocket messages sent and received over persistent connections
  • Build RESTful APIs with minimal boilerplate by combining validation and documentation
  • Switch between msgspec and pydantic validators without changing application code

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Quart-Schema adds schema validation and auto-generated OpenAPI documentation to Quart async web applications, supporting both msgspec and pydantic for request/response validation.

Yes. Quart-Schema is actively maintained, has no known vulnerabilities, and offers genuine value for async REST API development: it eliminates manual schema and documentation management while providing flexible validation. The low install friction and permissive MIT license make it a straightforward add-on. Install it if you're building Quart applications and want schema validation with auto-generated API docs.

Install

quart-schema on PyPI

pip

pip install quart-schema

uv

uv add quart-schema

poetry

poetry add quart-schema

Installing quart-schema

Before you install

Low friction installation with three runtime dependencies. Actively maintained with a release within the last 10 days. Supports current Python versions (3.10 through 3.14).

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

Quickstart

pip install quart-schema

from quart import Quart
from quart_schema import QuartSchema

app = Quart(__name__)
QuartSchema(app)

Requires Python 3.10 or later. Quart must be installed as a runtime dependency.

Verify before relying

  • Performance characteristics when validating large request/response payloads
  • Compatibility matrix between msgspec and pydantic versions supported
  • WebSocket validation limitations or known issues beyond the 'no documentation standard' note

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — pyhumps, quart, typing_extensions
Maintenance actively maintained — 10 days since the last release
First released
Downloads 233,959/month — #9,030 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: quart_schema-0.24.0-py3-none-any.whl

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

quart api schema validationasync python openapi documentationquart request response validationrest api schema generationquart websocket validationopenapi swagger documentation quartpydantic msgspec validation decorator
async-webopenapi-generationschema-validation

More Python Modules packages