Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kespindler/albatross
A modern, fast, simple async python3 web framework
https://github.com/kespindler/albatross
Last synced: 4 months ago
JSON representation
A modern, fast, simple async python3 web framework
- Host: GitHub
- URL: https://github.com/kespindler/albatross
- Owner: kespindler
- Created: 2016-06-30T03:58:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-14T23:23:29.000Z (over 8 years ago)
- Last Synced: 2024-10-13T03:20:00.300Z (4 months ago)
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 164
- Watchers: 10
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- starred-awesome - albatross - A modern, fast, simple async python3 web framework (Python)
README
[](https://travis-ci.org/kespindler/albatross)
# Albatross
A modern, fast, simple, natively-async web framework. (Python3.5 only)
```python
from albatross import Server
import asyncioclass 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 making no claims about API stability (but will try to avoid changes). That said,
I'm using this framework for some small projects, and it is a joy to work in!
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. Doing `await` database calls or controller calls in your views just works!
- 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.