Sanic

Sanic is a Python web framework built on uvloop and designed for fast HTTP responses via asynchronous request handling.

Sanic web framework logo.

What are the tradeoffs of using Sanic?

Sanic cannot be developed or deployed on Windows due to its necessary uvloop dependency.

Sanic is an implementation of the web framework concept. Learn how these parts fit together in the web development chapter or view all topics.

There was an excellent discussion on the /r/python subreddit about using one of the newer async frameworks such as Sanic or Japronto compared with a traditional web framework like Django. One of the major tradeoff of adopting a newer framework is simply that the code library ecosystem has not, and may never, grow up around that framework. You have to accept the risk that you will need to build a significant amount of the plumbing yourself rather than pip installing existing, well-tested libraries.

Sanic tutorials

Sanic is under very active development and is still in its infancy as a web framework. The following tutorials will get you started but there is a chance you will have to work through errors as Sanic is regularly updated.

Sanic open source projects and examples

There are not many example applications and extensions for Sanic compared to Flask, Django or other web frameworks because Sanic is still so new. However, there are some initial projects that are useful for figuring out how to build your first applications with this framework.

More on web frameworks or move to deployment?

I want to learn how to code a Python web application using a framework.

What is the Django web framework?

I've built a Python web app, now how do I deploy it?


Matt Makai 2012-2022