aiohttp-middlewares
Collection of useful middlewares for aiohttp.web applications.
Works on Python 3.10+
Works with aiohttp.web 3.11.0+
BSD licensed
Latest documentation on Read The Docs
Source, issues, and pull requests on GitHub
Quick Start
By default aiohttp.web does not provide many built-in middlewares for standart web-development needs such as: handling errors, shielding view handlers, or providing CORS headers.
aiohttp-middlewares tries to 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 origin 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.
Release files for aiohttp-middlewares 3.0.0
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-3.0.0.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiohttp_middlewares-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.9 kB
Release files / aiohttp_middlewares-3.0.0.tar.gz
| Download URL | aiohttp_middlewares-3.0.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c73dcb7329df334f4d39bf717ee34c3d150f3b3dffe5fb6357cae6af55f9ce47
|
|
BLAKE2b-256 checksum How to use checksums |
264217c555327edbf10ab84afe8a0e1e0399f071178553d316e9ce2c8a223b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / aiohttp_middlewares-3.0.0-py3-none-any.whl
| Download URL | aiohttp_middlewares-3.0.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ed657872aa2fcb7eb599347ac17209c2a2d426cfea5f7ffc36e37d4cd960730
|
|
BLAKE2b-256 checksum How to use checksums |
a6ed415c4b363fb9c6165842455ca3f1ac6ba85c010ef020f36a3c672f0af6e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|