Skip to main content

Collection of useful middlewares for aiohttp applications.

Project description

CI Workflow pre-commit black Latest Version Python versions BSD License Coverage Documentation

Collection of useful middlewares for aiohttp.web 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


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 (

app = web.Application(

Check documentation for all available middlewares and available initialization options.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiohttp-middlewares, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size aiohttp_middlewares-1.1.0-py3-none-any.whl (17.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size aiohttp-middlewares-1.1.0.tar.gz (14.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page