Access original `Scope` or `Environ` during conversion
masterWhen using a2wsgi middleware, you can access the original protocol-specific metadata within the converted application:
- In an ASGI application (converted from WSGI): Access the original WSGI
environviascope["wsgi_environ"]. - In a WSGI application (converted from ASGI): Access the original ASGI
scopeviaenviron["asgi.scope"].
# Inside an ASGI app converted from WSGI
wsgi_env = scope["wsgi_environ"]
# Inside a WSGI app converted from ASGI
asgi_scope = environ["asgi.scope"]