Debian Codegraph @

docs/content/exporting/http/asgi.md

raw symbols SCIP
1 ---
2 title: ASGI
3 weight: 3
4 ---
5
6 To use Prometheus with [ASGI](http://asgi.readthedocs.org/en/latest/), there is
7 `make_asgi_app` which creates an ASGI application.
8
9 ```python
10 from prometheus_client import make_asgi_app
11
12 app = make_asgi_app()
13 ```
14 Such an application can be useful when integrating Prometheus metrics with ASGI
15 apps.
16
17 By default, the ASGI application will respect `Accept-Encoding:gzip` headers used by Prometheus
18 and compress the response if such a header is present. This behaviour can be disabled by passing
19 `disable_compression=True` when creating the app, like this:
20
21 ```python
22 app = make_asgi_app(disable_compression=True)
23 ```