--- id: sanic version: "25.12.1" license: MIT license_treatment: permissive maintenance: active --- # sanic — A web server and web framework that's written to go fast. Build fast. Run fast. License: permissive · Maintenance: active · Downloads: 1.6M/mo ## What it is and what it does Sanic is a web framework and server for Python 3.10+ designed around async/await syntax to build non-blocking, high-performance HTTP applications. It is ASGI-compliant, meaning you can deploy it with alternative ASGI servers if needed. The framework includes 11 runtime dependencies—notably sanic-routing for URL matching, httptools for HTTP parsing, uvloop for faster event loop execution, and ujson for faster JSON serialization—all of which can be toggled off at install time via environment variables if you prefer lighter dependencies. The package is actively maintained by the community, with a recent release and an established user base. It targets developers building REST APIs, microservices, and real-time applications where request latency and throughput matter. The learning curve is shallow for anyone familiar with Flask or FastAPI, and the async-first design makes it natural to integrate with other async libraries. Use it for: - Build REST APIs and microservices that handle many concurrent requests with minimal latency. - Create real-time applications (WebSocket support via websockets dependency) that need fast bidirectional communication. - Deploy lightweight HTTP servers in containerized or serverless environments where startup time and memory footprint are constrained. - Integrate async Python code (database drivers, external API calls) without blocking the request handler. - Prototype or scale web applications where async/await patterns are already part of your codebase. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sanic is an async Python web framework and ASGI-compliant server built for high performance, using async/await syntax to handle requests without blocking. Yes. Sanic is a solid choice for async Python web development. It has low install friction, active maintenance, no known vulnerabilities, permissive licensing, and a clear performance focus backed by a community-maintained project. Install it if you need an async web framework for Python 3.10+ and are comfortable with the 11 runtime dependencies—or if you want to exclude uvloop and ujson, set the environment variables at install time. ## Install pip install sanic uv add sanic poetry add sanic ## Installing sanic Before you install: Low install friction with a pure-wheel distribution. Active maintenance with a recent release (75 days ago) and ongoing community support. Requires Python 3.10+. Includes 11 runtime dependencies, notably uvloop and ujson for performance, both optional via environment variables at install time. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install sanic from sanic import Sanic from sanic.response import json app = Sanic("my-app") @app.route('/') async def handler(request): return json({'hello': 'world'}) # Run with: sanic my_app.app Requires Python 3.10 or later. On Fedora 28+, redhat-rpm-config may be needed if using ujson. Verify before relying: - Whether uvloop and ujson provide measurable performance gains for typical workloads compared to standard alternatives. - How Sanic's performance scales under high concurrency relative to other async frameworks. - Whether the 11 runtime dependencies introduce meaningful maintenance or security surface area over time. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async python web framework, fast asgi web server, python 3.10 async http server, non-blocking web framework, high performance python web, async request handling, python async web development, async-first, asgi-compliant, high-performance [View on SkillFed](https://skillfed.io/packages/sanic) · [View on PyPI](https://pypi.org/project/sanic/)