A modern async python3 web framework
Project description
Albatross
A modern, fast, simple, natively-async web framework. (Python3.5 only)
from albatross import Server
import asyncio
class Handler:
async def on_get(self, req, res):
await asyncio.sleep(0.1)
res.write('Hello, %s' % req.args['name'])
app = Server()
app.add_route('/{name})', Handler())
app.serve()
Notes for Usage
For now (pre 1.0.0), I’m not guaranteeing the API stays the same. The current HTTP implementation has some deviations with the HTTP standard (see Issues), but this web framework is a joy to work with for some current toy projects. Fixing the HTTP standards issue will be done in the next few weeks. Reach out if you want to use this, as I’m happy to incorporate your feedback!
Install
pip3 install albatross3
Features
You can read the entire codebase in about 30 minutes.
It’s natively async
This works with the uvloop project, to make your server fast!
Benchmarks
My benchmarks indicate that albatross is as fast as aiohttp, both of which are twice as fast as tornado. You can run the benchmarks by poking around in the bench/ folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for albatross3-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 986aec6b84e1737a5dd7c1ae6f48498af61f49cf95980c10f7d272c081d04ab9 |
|
MD5 | 15ee846dd9f7611b482b5a39cde63123 |
|
BLAKE2b-256 | b783748f8baff2c6c95f42fd35d2b7e4d1f8fafe589c507697f6d84c4c388efb |