This release is a pre-release and may not be stable for production use.
aiohttp-middlewares
Collection of useful middlewares for aiohttp applications.
Works on Python 3.6+
Works with aiohttp 3.5+
BSD licensed
Latest documentation on Read The Docs
Source, issues, and pull requests on GitHub
Quickstart
By default aiohttp.web does not provide many built-in middlewares for standart web development actions such as handling errors, shielding view handlers, or providing CORS headers.
aiohttp-middlewares fix this by providing several middlewares that aims to cover most common web-development needs.
For example, to enable CORS headers for http://localhost:8081 and handle errors for aiohttp.web application you need to,
from aiohttp import web
from aiohttp_middlewares import cors_middleware, error_middleware
app = web.Application(
middlewares=(
cors_middleware(origins=("http://localhost:8081",)),
error_middleware(),
)
)
Check documentation for all available middlewares and available initialization options.
Metadata
Release files for aiohttp-middlewares 1.0.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiohttp-middlewares-1.0.0b0.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiohttp_middlewares-1.0.0b0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.3 kB
Release files / aiohttp-middlewares-1.0.0b0.tar.gz
| Download URL | aiohttp-middlewares-1.0.0b0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
916ca6f891e2fc6a422675c757681f4d8e981916ac474d86408a9595a35b511e
|
|
BLAKE2b-256 checksum How to use checksums |
d5260fd0b69b25f216fefd92252d93de188db431d3d5dec4ea038493cf6f8636
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.0 CPython/3.8.0 Linux/4.15.0-1052-aws
|
Release files / aiohttp_middlewares-1.0.0b0-py3-none-any.whl
| Download URL | aiohttp_middlewares-1.0.0b0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de6ea9e831a448ccc94ee3196a5d949c76283f1f2f2f3d65333e1dde748f2141
|
|
BLAKE2b-256 checksum How to use checksums |
c49cbef94f93961d065b69b11ec0042e3fa4a55ab055ccd221b202073db8dcac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.0 CPython/3.8.0 Linux/4.15.0-1052-aws
|