Coding

Sanic – asynchronous web server and web framework

Sanic is an asynchronous web framework and HTTP server designed for applications that need to handle large numbers of concurrent requests. It combines request routing, HTTP processing and application management in an integrated framework.

Applications are constructed around route handlers, which can perform asynchronous operations while other requests continue to be processed. This approach is particularly useful for services that communicate with databases, remote APIs and other network resources.

Sanic provides facilities for structuring larger applications, handling errors and coordinating background services. It includes its own HTTP server and can also operate through an ASGI-compatible server.

This is free and open source software.

Key Features

  • Asynchronous HTTP request handling and configurable server worker processes.
  • Dynamic URL routing with typed parameters and HTTP method restrictions.
  • Blueprints for organising routes, middleware and listeners into application modules.
  • Request middleware and response middleware for centralised processing.
  • WebSocket routes for real-time bidirectional communication.
  • Streaming HTTP responses and support for processing streaming request bodies.
  • Listeners for server startup, shutdown and application lifecycle events.
  • Application context and shared context facilities for managing resources.
  • Exception handlers for custom HTTP errors and application failures.
  • Request parsing for JSON, forms, query parameters, cookies and uploaded files.
  • Static file serving and support for file-based responses.
  • Application-level and blueprint-level configuration management.
  • Testing utilities and an asynchronous test client.
  • ASGI compatibility for integration with alternative application servers.

Website: github.com/sanic-org/sanic
Support:
Developer: Sanic Community
License: MIT License

Sanic is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Best Python Micro Frameworks
FlaskHugely popular microframework based on Werkzeug and Jinja2
FastAPIWeb framework for building APIs
StarletteLightweight ASGI framework/toolkit
aiohttpAsynchronous HTTP client/server for asyncio and Python
SanicWeb server and web framework
FalconBuild cloud APIs, smart proxies, and app backends
QuartWeb microframework based on Asyncio
PyramidStart small, finish big, stay finished framework
BottleFast, simple and lightweight WSGI micro web framework
ChalicePython Serverless Microframework for AWS
CherryPyMature, minimalist, Python object-oriented web framework
TurboGearsHybrid framework acting as a Full Stack framework or Microframework
QuixoteAimed at sites where complex programming is required
KleinMicro-framework for developing production-ready web services with Python
circuitsLightweight event driven application framework
ClasticFunctional web framework
HugMake developing Python driven APIs as simple as possible
MicroPieUltra-micro ASGI Python web framework
LitestarPowerful, lightweight, and flexible ASGI framework
BlackSheepAsynchronous Python web framework
RobynPython web framework designed for high performance
MicrodotSmall web framework for Python and MicroPython

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted