Ravenports generated: 06 May 2023 00:43
[ravenports.git] / bucket_B6 / python-django-prometheus
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-django-prometheus
4 VERSION=                2.3.1
5 KEYWORDS=               python
6 VARIANTS=               py310 v11
7 SDESC[py310]=           Django app monitor with Prometheus.io (3.10)
8 SDESC[v11]=             Django app monitor with Prometheus.io (3.11)
9 HOMEPAGE=               https://github.com/korfuri/django-prometheus
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/3a/75/fb3d4f056f9ed4f8848817d5afd7a1d949632ab117452ccd179e3839cfc4
14 DISTFILE[1]=            django_prometheus-2.3.1-py2.py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[py310]=           single
17 SPKGS[v11]=             single
18
19 OPTIONS_AVAILABLE=      PY310 PY311
20 OPTIONS_STANDARD=       none
21 VOPTS[py310]=           PY310=ON PY311=OFF
22 VOPTS[v11]=             PY310=OFF PY311=ON
23
24 DISTNAME=               django_prometheus-2.3.1.dist-info
25
26 GENERATED=              yes
27
28 [PY310].RUN_DEPENDS_ON=                 python-prometheus-client:single:py310
29 [PY310].USES_ON=                        python:py310,wheel
30
31 [PY311].RUN_DEPENDS_ON=                 python-prometheus-client:single:v11
32 [PY311].USES_ON=                        python:v11,wheel
33
34 [FILE:2324:descriptions/desc.single]
35 # django-prometheus
36
37 Export Django monitoring metrics for Prometheus.io
38
39 [![Join the chat at
40 https://gitter.im/django-prometheus/community]](https://gitter.im/django-prometheus/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
41
42 [PyPI version]
43 [Build Status]
44 [Coverage Status]
45 [![PyPi page link -- Python
46 versions]](https://pypi.python.org/pypi/django-prometheus)
47 [![Code style: black]](https://github.com/psf/black)
48
49 ## Features
50
51 This library provides Prometheus metrics for Django related operations:
52
53 * Requests & Responses
54 * Database access done via [Django ORM]
55 * Cache access done via [Django Cache framework]
56
57 ## Usage
58
59 ### Requirements
60
61 * Django >= 3.2
62 * Python 3.7 and above.
63
64 ### Installation
65
66 Install with:
67
68 ```shell
69 pip install django-prometheus
70 ```
71
72 Or, if you're using a development version cloned from this repository:
73
74 ```shell
75 python path-to-where-you-cloned-django-prometheus/setup.py install
76 ```
77
78 This will install [prometheus_client] as a dependency.
79
80 ### Quickstart
81
82 In your settings.py:
83
84 ```python
85 INSTALLED_APPS = [
86    ...
87    'django_prometheus',
88    ...
89 ]
90
91 MIDDLEWARE = [
92     'django_prometheus.middleware.PrometheusBeforeMiddleware',
93     # All your other middlewares go here, including the default
94     # middlewares like SessionMiddleware, CommonMiddleware,
95     # CsrfViewmiddleware, SecurityMiddleware, etc.
96     'django_prometheus.middleware.PrometheusAfterMiddleware',
97 ]
98 ```
99
100 In your urls.py:
101
102 ```python
103 urlpatterns = [
104     ...
105     path('', include('django_prometheus.urls')),
106 ]
107 ```
108
109 ### Configuration
110
111 Prometheus uses Histogram based grouping for monitoring latencies. The
112 default
113 buckets are:
114
115 ```python
116 PROMETHEUS_LATENCY_BUCKETS = (0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5,
117 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 25.0, 50.0, 75.0, float("inf"),)
118 ```
119
120 You can define custom buckets for latency, adding more buckets decreases
121 performance but
122 increases accuracy: <https://prometheus.io/docs/practices/histograms/>
123
124 ```python
125 PROMETHEUS_LATENCY_BUCKETS = (.1, .2, .5, .6, .8, 1.0, 2.0, 3.0, 4.0, 5.0,
126 6.0, 7.5, 9.0, 12.0, 15.0, 20.0, 30.0, float("inf"))
127 ```
128
129 ### Monitoring your databases
130
131 SQLite, MySQL, and PostgreSQL databases can be monitored. Just
132 replace the `ENGINE` property of your database, replacing
133 `django.db.backends` with `django_prometheus.db.backends`.
134
135
136
137 [FILE:123:distinfo]
138 cf9b26f7ba2e4568f08f8f91480a2882023f5908579681bcf06a4d2465f12168        29081 django_prometheus-2.3.1-py2.py3-none-any.whl
139