sanic 25.3.0


pip install sanic

  Latest version

Released: Mar 31, 2025

Project Links

Meta
Author: Sanic Community
Requires Python: >=3.8

Classifiers

Development Status
  • 4 - Beta

Environment
  • Web Environment

License
  • OSI Approved :: MIT License

Programming Language
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
Sanic | Build fast. Run fast.

Sanic | Build fast. Run fast.

Build

Tests

Docs

UserGuide Documentation

Package

PyPI PyPI version PyPI Wheel Supported implementations Code style ruff

Support

Forums Discord Awesome Sanic List

Stats

Downloads Downloads Downloads

Sanic is a Python 3.9+ web server and web framework that’s written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy.

Sanic is also ASGI compliant, so you can deploy it with an alternative ASGI webserver.

Source code on GitHub | Help and discussion board | User Guide | Chat on Discord

The project is maintained by the community, for the community. Contributions are welcome!

The goal of the project is to provide a simple way to get up and running a highly performant HTTP server that is easy to build, to expand, and ultimately to scale.

Installation

pip install sanic

Sanic makes use of uvloop and ujson to help with performance. If you do not want to use those packages, simply add an environmental variable SANIC_NO_UVLOOP=true or SANIC_NO_UJSON=true at install time.

$ export SANIC_NO_UVLOOP=true
$ export SANIC_NO_UJSON=true
$ pip install --no-binary :all: sanic

Hello World Example

from sanic import Sanic
from sanic.response import json

app = Sanic("my-hello-world-app")

@app.route('/')
async def test(request):
    return json({'hello': 'world'})

Sanic can now be easily run from CLI using sanic hello.app.

[2018-12-30 11:37:41 +0200] [13564] [INFO] Goin' Fast @ http://127.0.0.1:8000
[2018-12-30 11:37:41 +0200] [13564] [INFO] Starting worker [13564]

And, we can verify it is working: curl localhost:8000 -i

HTTP/1.1 200 OK
Connection: keep-alive
Keep-Alive: 5
Content-Length: 17
Content-Type: application/json

{"hello":"world"}

Now, let’s go build something fast!

Minimum Python version is 3.9.

Documentation

User Guide, Changelog, and API Documentation can be found at sanic.dev.

Questions and Discussion

Ask a question or join the conversation.

Contribution

We are always happy to have new contributions. We have marked issues good for anyone looking to get started, and welcome questions on the forums. Please take a look at our Contribution guidelines.

25.3.0 Mar 31, 2025
24.12.0 Dec 31, 2024
24.6.0 Jun 30, 2024
23.12.2 Jun 30, 2024
23.12.1 Jan 09, 2024
23.12.0 Dec 31, 2023
23.6.0 Jul 25, 2023
23.3.0 Mar 26, 2023
22.12.0 Dec 27, 2022
22.9.1 Oct 31, 2022
22.9.0 Sep 29, 2022
22.6.2 Aug 11, 2022
22.6.1 Jul 31, 2022
22.6.0 Jun 30, 2022
22.3.2 May 11, 2022
22.3.1 Apr 17, 2022
22.3.0 Mar 31, 2022
21.12.2 Jul 31, 2022
21.12.1 Jan 06, 2022
21.12.0 Dec 26, 2021
21.9.3 Nov 21, 2021
21.9.2 Nov 21, 2021
21.9.1 Oct 02, 2021
21.9.0 Sep 30, 2021
21.6.2 Aug 02, 2021
21.6.1 Jul 28, 2021
21.6.0 Jun 27, 2021
21.3.4 Apr 19, 2021
21.3.2 Mar 23, 2021
21.3.1 Mar 21, 2021
21.3.0 Mar 21, 2021
20.12.7 Jul 31, 2022
20.12.6 Feb 16, 2022
20.12.5 Jan 16, 2022
20.12.4 Oct 02, 2021
20.12.3 Mar 21, 2021
20.12.2 Feb 16, 2021
20.12.1 Jan 05, 2021
20.12.0 Dec 28, 2020
20.9.1 Oct 25, 2020
20.9.0 Sep 30, 2020
20.6.3 Jun 29, 2020
20.6.2 Jun 29, 2020
20.6.1 Jun 28, 2020
20.6.0 Jun 28, 2020
20.3.0 May 14, 2020
19.12.5 Feb 16, 2021
19.12.4 Nov 05, 2020
19.12.3 Oct 25, 2020
19.12.2 Jan 02, 2020
19.12.0 Dec 27, 2019
19.9.0 Oct 12, 2019
19.6.3 Aug 22, 2019
19.6.2 Jul 08, 2019
19.6.0 Jun 21, 2019
19.3.1 Mar 23, 2019
18.12.0 Dec 27, 2018
0.8.3 Sep 13, 2018
0.8.2 Sep 13, 2018
0.8.1 Sep 06, 2018
0.8.0 Sep 06, 2018
0.7.0 Dec 06, 2017
0.6.0 Aug 03, 2017
0.5.4 May 09, 2017
0.5.2 Apr 24, 2017
0.5.1 Apr 14, 2017
0.5.0 Apr 11, 2017
0.4.1 Feb 28, 2017
0.4.0 Feb 25, 2017
0.3.1 Feb 09, 2017
0.3.0 Jan 28, 2017
0.2.0 Jan 14, 2017
0.1.9 Dec 25, 2016
0.1.8 Nov 29, 2016
0.1.7 Oct 25, 2016
0.1.6 Oct 25, 2016
0.1.5 Oct 23, 2016
0.1.4 Oct 18, 2016
0.1.3 Oct 16, 2016
0.1.1 Oct 15, 2016
0.1.0 Oct 15, 2016

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
sanic-routing (>=23.12.0)
httptools (>=0.0.10)
uvloop and (>=0.15.0)
ujson and (>=1.35)
aiofiles (>=0.6.0)
websockets (>=10.0)
multidict (<7.0,>=5.0)
html5tagger (>=1.2.1)
tracerite (>=1.0.0)
typing-extensions (>=4.4.0)
setuptools (>=70.1.0)