--- id: sanic-ext version: "25.12.0" license: MIT license_treatment: permissive maintenance: aging --- # sanic-ext — Extend your Sanic installation with some core functionality. License: permissive · Maintenance: aging · Downloads: 720.6K/mo ## What it is and what it does Sanic Extensions is an officially supported plugin for the Sanic web framework that layers additional developer conveniences on top of Sanic's unopinionated core. It provides OpenAPI documentation generation with Redoc and Swagger UI, request validation for query arguments and request bodies, CORS protection, automatic HEAD/OPTIONS/TRACE endpoint creation, and argument injection into route handlers. The package depends only on pyyaml and sanic itself, making it lightweight to add to an existing Sanic installation. The extension is designed to work transparently—once installed, it automatically enhances a Sanic application without requiring major code changes. It targets developers who want Sanic's flexibility but also need common REST API features like schema validation and API documentation out of the box, without building those layers themselves. Use it for: - Generate OpenAPI documentation and interactive Swagger UI for a Sanic REST API without manual schema definition - Validate incoming request query parameters and JSON body payloads against a schema before route handlers execute - Add CORS headers and protection to a Sanic application serving cross-origin requests - Automatically handle HTTP OPTIONS and HEAD requests for existing GET endpoints - Inject validated request arguments directly into route handler function signatures ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sanic Extensions adds OpenAPI documentation, request validation, CORS, argument injection, and automatic HTTP method handling to Sanic web applications. Yes, if you are already using Sanic and need OpenAPI documentation, request validation, or CORS support. The low install friction and permissive license make it a straightforward addition. However, the aging maintenance status (206 days since last release) and ALPHA-stage API designation in the description suggest caution for production use—verify current stability and whether the API has stabilized since the excerpt was written. ## Install pip install sanic-ext uv add sanic-ext poetry add sanic-ext ## Installing sanic-ext Before you install: Low install friction with just two runtime dependencies (pyyaml and sanic). Maintenance status is aging—last commit was 206 days ago—but the repository remains active and not archived, suggesting ongoing but infrequent updates. License in practice: MIT license is permissive, allowing commercial use, modification, and distribution with minimal restrictions. No licensing concerns for most projects. Quickstart: pip install sanic-ext from sanic import Sanic from sanic_ext import Extend app = Sanic("MyApp") Extend(app) Verify before relying: - Whether automatic extension occurs without explicit Extend() call as description suggests - Current stability status beyond 'ALPHA' designation in the excerpt - Specific Python version requirements despite classifiers listing 3.10–3.14 ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 720.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sanic openapi documentation, sanic request validation, sanic cors middleware, sanic swagger redoc, sanic argument injection, sanic extensions plugin, sanic rest api tools, sanic-plugin, openapi-documentation, rest-api [View on SkillFed](https://skillfed.io/packages/sanic-ext) · [View on PyPI](https://pypi.org/project/sanic-ext/)