A modern async python3 web framework
Project description
# Albatross
I wanted to see how simple it is to make an modern async web framework. (python3.5 only)
It turns out - it’s dead simple.
## Usage
Create an app. Create handlers that have async functions on_get, on_post, etc. Call add_route with regex-based routes to add the handlers. Call app.serve().
See examples/ for examples.
## Features
You can read the entire codebase in about 10 minutes. There are probably many non-HTTP-compliant and subtle bugs as a consequence, but it works for building simple or moderately complex servers right now!
It’s natively async
This works with the awesome uvloop project. It doesn’t yet work with pypy3, because they don’t support python3.5. Let’s make it happen!
## Framework
The entire framework is 4 files at the moment:
status_codes.py - blatantly copied from Falcon, because they did such a great job with that framework.
server.py - the web server you instantiate, add routes & handlers, and allows you to serve
request.py - a web request object
response.py - a web response object
Each of those is less than 100 lines or so.
## Current Gotchas
Be careful with casing on HTTP headers. The framework should force standardization, but currently they are case-sensitive.
## Todo
tests: tests are a good idea. I should write some.
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 Distributions
Hashes for albatross3-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 599c9d131811c5236be271bf05cbc4a53f8e76bef13969026d470afd831604dc |
|
MD5 | ab409a16bf326aa562b15ae9c96ddce6 |
|
BLAKE2b-256 | fe85b24d88ec924410678d3dd4b21a77749edd5a4c3cf714a2f0bf9b8aa46d23 |
Hashes for albatross3-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be56ab0c31583de43b23c35eda7ffa178fb56dd121a73ec694df290d6b67504 |
|
MD5 | 3fae49c8be5990233857f0c34520b881 |
|
BLAKE2b-256 | cea23e447e0160a76c3675f1f5b4761f80638401e91d0e0be4636debfe0bec0b |