Writing ASGI middleware

The docs say: from some_asgi_library import AmazingMiddleware

That’s a bit sparse.

Does anybody have an example of how to write an async middleware?

ASGI spec: https://asgi.readthedocs.io/en/latest/specs/index.html

Awesome ASGI list that has pretty much everything in the ecosystem: https://github.com/florimondmanca/awesome-asgi

OK. The examples really look simple.

The spec may be a bit much for somebody new to this. This bit over at Channels looks like a good overview: https://channels.readthedocs.io/en/latest/asgi.html#summary