File: README.rst

package info (click to toggle)
python-aiohttp-openmetrics 0.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92 kB
  • sloc: python: 119; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
aiohttp-openmetrics
===================

This project contains a simple middleware and /metrics route endpoint for
aiohttp that allow easy implementation of the
`openmetrics <https://www.openmetrics.org/>`_ protocol.

At the moment, this package is a thin wrapper around the ``prometheus_client``
package.

Example usage
-------------

.. code-block:: python

  from aiohttp import web
  from aiohttp_openmetrics import metrics, metrics_middleware

  app = web.Application()
  app.middlewares.append(metrics_middlware)
  app.router.add_get('/metrics', metrics)

  web.run_app(app)

License
-------

This package is licensed under the Apache v2 or later license.