Metadata-Version: 2.0
Name: prometheus-async
Version: 16.0.0
Summary: Async helpers for prometheus_client.
Home-page: https://prometheus-async.readthedocs.io/
Author: Hynek Schlawack
Author-email: hs@ox.cx
License: Apache License, Version 2.0
Keywords: metrics,prometheus,twisted,asyncio
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: prometheus-client
Requires-Dist: six
Requires-Dist: wrapt
Requires-Dist: monotonic; python_version<'3.4'
Provides-Extra: consul
Requires-Dist: aiohttp; extra == 'consul'
Requires-Dist: python-consul; extra == 'consul'
Provides-Extra: twisted
Requires-Dist: twisted; extra == 'twisted'

================
prometheus_async
================

.. image:: https://travis-ci.org/hynek/prometheus_async.svg?branch=master
   :target: https://travis-ci.org/hynek/prometheus_async

.. image:: https://codecov.io/github/hynek/prometheus_async/coverage.svg?branch=master
    :target: https://codecov.io/github/hynek/prometheus_async?branch=master

.. teaser-begin

``prometheus_async`` adds support for asynchronous frameworks to the official `Python client`_ for the Prometheus_ metrics and monitoring system.

Currently asyncio_ (Python 3.4, 3.5) and Twisted_ (Python 2.7, 3.4, 3.5, PyPy) are supported.


It works by wrapping the metrics from the official client:

.. code-block:: python

   import asyncio

   from aiohttp import web
   from prometheus_client import Histogram
   from prometheus_async.aio import time

   REQ_TIME = Histogram("req_time_seconds", "time spent in requests")

   @time(REQ_TIME)
   async def req(request):
       await asyncio.sleep(1)
       return web.Response(body=b"hello")


Even for *synchronous* applications, the metrics exposure methods can be useful since they are more powerful than the one shipped with the official client.
For that, helper functions have been added that run them in separate threads (asyncio-only for the time being).

The source code is hosted on GitHub_ and the documentation on `Read The Docs`_.


.. _asyncio: https://docs.python.org/3/library/asyncio.html
.. _`Python client`: https://github.com/prometheus/client_python
.. _Prometheus: https://prometheus.io/
.. _Twisted: https://twistedmatrix.com/
.. _GitHub: https://github.com/hynek/prometheus_async
.. _`Read The Docs`: https://prometheus-async.readthedocs.io/


Release Information
===================

16.0.0 (2016-05-19)
-------------------

Changes:
^^^^^^^^

- Initial release.

`Full changelog <https://prometheus-async.readthedocs.io/en/stable/changelog.html>`_.

Credits
=======

``prometheus_async`` is written and maintained by `Hynek Schlawack <https://hynek.me/>`_.

The development is kindly supported by `Variomedia AG <https://www.variomedia.de/>`_.

Other contributors can be found in `GitHub's overview <https://github.com/hynek/prometheus_async/graphs/contributors>`_.


