Japronto (from Portuguese "já pronto" /ˈʒa pɾõtu/ meaning "already done") is a screaming-fast, scalable, asynchronous Python 3.5+ web micro-framework integrated with pipelining HTTP server based on uvloop and picohttpparser.
You can read more in the release announcement on medium
Here comes a chart to help you imagine what kind of things you can do with Japronto:
These results of a simple "Hello world" application were obtained on AWS c4.2xlarge instance. To be fair all the contestants (including Go) were running single worker process. Servers were load tested using wrk with 1 thread, 100 connections and 24 simultaneous (pipelined) requests per connection (cumulative parallelism of 2400 requests).
The source code for the benchmark can be found in benchmarks directory.
The server is written in hand tweaked C trying to take advantage of modern CPUs. It relies on picohttpparser for header & chunked-encoding parsing while uvloop provides asynchronous I/O. It also tries to save up on system calls by combining writes together when possible.
Here is how a simple web application looks like in Japronto:
from japronto import Application
def hello(request):
return request.Response(text='Hello world!')
app = Application()
app.router.add_route('/', hello)
app.run(debug=True)
- Getting started
- Asynchronous handlers
- Router
- Request object
- Response object
- Handling exceptions
- Extending request
- HTTP 1.x implementation with support for chunked uploads
- Full support for HTTP pipelining
- Keep-alive connections with configurable reaper
- Support for synchronous and asynchronous views
- Master-multiworker model based on forking
- Support for code reloading on changes
- Simple routing
This software is distributed under MIT License. This is a very permissive license that let's you use this software for any commercial and non-commercial work. Full text of the license is incuded in LICENSE.txt file.
The source distribution of this software includes a copy of picohttpparser which is distributed under MIT license as well.