Skip to content

AIOHTTP

Classes

Functions

aiohttp_request_factory()

Provide the current aiohttp request as a dependency.

Note that this requires the Wireup-aiohttp integration to be set up.

get_app_container(app)

Return the container associated with the given AIOHTTP application.

get_request_container()

When inside a request, returns the scoped container instance handling the current request.

setup(container, app, handlers=None)

Integrate Wireup with AIOHTTP.

If you need access to aiohttp.web.Request in your services, add this module to the service_modules in your container's service modules.

Parameters:

Name Type Description Default
container AsyncContainer

A Wireup async container.

required
app Application

An AIOHTTP server application.

required
handlers Optional[Iterable[Type[_WireupHandler]]]

A list of Wireup class-based handlers. See: https://maldoinc.github.io/wireup/latest/integrations/aiohttp/class_based_handlers/

None