Muffin-Prometheus
#################
.. _description:
**Muffin-Prometheus** -- Prometheus_ metrics exporter for Muffin_ framework
.. _badges:
.. image:: https://github.com/klen/muffin-prometheus/workflows/tests/badge.svg
:target: https://github.com/klen/muffin-prometheus/actions
:alt: Tests Status
.. image:: https://img.shields.io/pypi/v/muffin-prometheus
:target: https://pypi.org/project/muffin-prometheus/
:alt: PYPI Version
.. image:: https://img.shields.io/pypi/pyversions/muffin-prometheus
:target: https://pypi.org/project/muffin-prometheus/
:alt: Python Versions
.. _contents:
.. contents::
.. _requirements:
Requirements
=============
- python >= 3.9
.. _installation:
Installation
=============
**Muffin-prometheus** should be installed using pip: ::
pip install muffin-prometheus
.. _usage:
Usage
=====
Initialize and setup the plugin:
.. code-block:: python
import muffin
import muffin_prometheus
# Create Muffin Application
app = muffin.Application('example')
# Initialize the plugin
# As alternative: prometheus = muffin_prometheus.Plugin(app, **options)
prometheus = muffin_prometheus.Plugin()
prometheus.setup(app, group_paths=['/api'])
Options
-------
=========================== =========================== ===========================
Name Default value Desctiption
--------------------------- --------------------------- ---------------------------
**metrics_url** ``"/dev/prometheus"`` HTTP Path to export metrics for Prometheus_
**group_paths** ``[]`` List of path's prefixes to group. A path which starts from the prefix will be grouped
=========================== =========================== ===========================
You are able to provide the options when you are initiliazing the plugin:
.. code-block:: python
prometheus.setup(app, metrics_url='/metrics', group_paths=['/views', '/api/v1', '/api/v2'])
Or setup it inside ``Muffin.Application`` config using the ``PROMETHEUS_`` prefix:
.. code-block:: python
PROMETHEUS_METRICS_URL = '/metrics'
PROMETHEUS_GROUP_PATHS = ['/views', '/api/v1', '/api/v2']
``Muffin.Application`` configuration options are case insensitive
.. _bugtracker:
Bug tracker
===========
If you have any suggestions, bug reports or annoyances please report them to
the issue tracker at https://github.com/klen/muffin-prometheus/issues
.. _contributing:
Contributing
============
Development of the plugin happens at: https://github.com/klen/muffin-prometheus
Contributors
=============
* klen_ (Kirill Klenov)
.. _license:
License
========
Licensed under a `MIT license`_.
.. _links:
.. _klen: https://github.com/klen
.. _Muffin: https://github.com/klen/muffin
.. _Prometheus: https://prometheus.io
.. _MIT license: http://opensource.org/licenses/MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/klen/muffin-prometheus",
"name": "muffin-prometheus",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "prometheus-exporter, muffin, asyncio, trio, curio",
"author": "Kirill Klenov",
"author_email": "horneds@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/74/8e/593e81764c50f94a9cc1c1d9c2919fb2986181684dd17a457697a0432896/muffin_prometheus-1.4.1.tar.gz",
"platform": null,
"description": "Muffin-Prometheus\n#################\n\n.. _description:\n\n**Muffin-Prometheus** -- Prometheus_ metrics exporter for Muffin_ framework\n\n.. _badges:\n\n.. image:: https://github.com/klen/muffin-prometheus/workflows/tests/badge.svg\n :target: https://github.com/klen/muffin-prometheus/actions\n :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-prometheus\n :target: https://pypi.org/project/muffin-prometheus/\n :alt: PYPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/muffin-prometheus\n :target: https://pypi.org/project/muffin-prometheus/\n :alt: Python Versions\n\n.. _contents:\n\n.. contents::\n\n.. _requirements:\n\nRequirements\n=============\n\n- python >= 3.9\n\n.. _installation:\n\nInstallation\n=============\n\n**Muffin-prometheus** should be installed using pip: ::\n\n pip install muffin-prometheus\n\n.. _usage:\n\nUsage\n=====\n\n\nInitialize and setup the plugin:\n\n.. code-block:: python\n\n import muffin\n import muffin_prometheus\n\n # Create Muffin Application\n app = muffin.Application('example')\n\n # Initialize the plugin\n # As alternative: prometheus = muffin_prometheus.Plugin(app, **options)\n prometheus = muffin_prometheus.Plugin()\n prometheus.setup(app, group_paths=['/api'])\n\n\nOptions\n-------\n\n=========================== =========================== ===========================\nName Default value Desctiption\n--------------------------- --------------------------- ---------------------------\n**metrics_url** ``\"/dev/prometheus\"`` HTTP Path to export metrics for Prometheus_\n**group_paths** ``[]`` List of path's prefixes to group. A path which starts from the prefix will be grouped\n=========================== =========================== ===========================\n\n\nYou are able to provide the options when you are initiliazing the plugin:\n\n.. code-block:: python\n\n prometheus.setup(app, metrics_url='/metrics', group_paths=['/views', '/api/v1', '/api/v2'])\n\n\nOr setup it inside ``Muffin.Application`` config using the ``PROMETHEUS_`` prefix:\n\n.. code-block:: python\n\n PROMETHEUS_METRICS_URL = '/metrics'\n\n PROMETHEUS_GROUP_PATHS = ['/views', '/api/v1', '/api/v2']\n\n``Muffin.Application`` configuration options are case insensitive\n\n\n.. _bugtracker:\n\nBug tracker\n===========\n\nIf you have any suggestions, bug reports or annoyances please report them to\nthe issue tracker at https://github.com/klen/muffin-prometheus/issues\n\n.. _contributing:\n\nContributing\n============\n\nDevelopment of the plugin happens at: https://github.com/klen/muffin-prometheus\n\n\nContributors\n=============\n\n* klen_ (Kirill Klenov)\n\n.. _license:\n\nLicense\n========\n\nLicensed under a `MIT license`_.\n\n.. _links:\n\n\n.. _klen: https://github.com/klen\n.. _Muffin: https://github.com/klen/muffin\n.. _Prometheus: https://prometheus.io\n\n.. _MIT license: http://opensource.org/licenses/MIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Prometheus metrics exporter for Muffin framework",
"version": "1.4.1",
"project_urls": {
"Homepage": "https://github.com/klen/muffin-prometheus",
"Repository": "https://github.com/klen/muffin-prometheus"
},
"split_keywords": [
"prometheus-exporter",
" muffin",
" asyncio",
" trio",
" curio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4eb966214e08b3001029d3b844eaa00fabd8b5900f078a344c9be320ccfb39d1",
"md5": "6c285a902ca7371b34ace13e596e7378",
"sha256": "d5c11c7b713a967a2b94fa2d585bc885ed6cb2482a9f2a49b6a6d22fbbadbb4f"
},
"downloads": -1,
"filename": "muffin_prometheus-1.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6c285a902ca7371b34ace13e596e7378",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 3231,
"upload_time": "2024-07-31T16:24:23",
"upload_time_iso_8601": "2024-07-31T16:24:23.444391Z",
"url": "https://files.pythonhosted.org/packages/4e/b9/66214e08b3001029d3b844eaa00fabd8b5900f078a344c9be320ccfb39d1/muffin_prometheus-1.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "748e593e81764c50f94a9cc1c1d9c2919fb2986181684dd17a457697a0432896",
"md5": "e1e488767e29211998872e9016d527de",
"sha256": "57e3294ede1d538daa522f7b7ef9be72112852bbdb31a27a439da1b4fcb47fcc"
},
"downloads": -1,
"filename": "muffin_prometheus-1.4.1.tar.gz",
"has_sig": false,
"md5_digest": "e1e488767e29211998872e9016d527de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 3094,
"upload_time": "2024-07-31T16:24:24",
"upload_time_iso_8601": "2024-07-31T16:24:24.840589Z",
"url": "https://files.pythonhosted.org/packages/74/8e/593e81764c50f94a9cc1c1d9c2919fb2986181684dd17a457697a0432896/muffin_prometheus-1.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-31 16:24:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "klen",
"github_project": "muffin-prometheus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "muffin-prometheus"
}