Abstract Base Classes¶
aiohttp has abstract classes for managing web interfaces.
The most part of
aiohttp.web is not intended to be inherited
but few of them are.
aiohttp.web is built on top of few concepts: application, router, request and response.
router is a plugable part: a library user may build a router from scratch, all other parts should work with new router seamlessly.
aiohttp.abc.AbstractMatchInfo.http_exception is an instance of
HTTPException like 404: NotFound or 405: Method
http_exception on call.
- class aiohttp.abc.AbstractRouter¶
- coroutine resolve(request)¶
Performs URL resolving. It’s an abstract method, should be overridden in router implementation.
- class aiohttp.abc.AbstractMatchInfo¶
Abstract match info, returned by
- coroutine handler(request)¶
Abstract method performing web-handler processing.
- coroutine expect_handler(request)¶
Abstract method for handling 100-continue processing.
Abstract Class Based Views¶
For class based view support aiohttp has abstract
AbstractView class which is awaitable (may be uses like
await Cls() or
yield from Cls() and has a request as an
Abstract Access Logger¶
- class aiohttp.abc.AbstractAccessLogger¶
An abstract class, base for all
logshould be overridden.