8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c9c27c commit 60c0d7eCopy full SHA for 60c0d7e
README.md
@@ -317,3 +317,19 @@ REGISTRY.register(CustomCollector())
317
318
`SummaryMetricFamily` and `HistogramMetricFamily` work similarly.
319
320
+
321
+## Parser
322
323
+The Python client supports parsing the Promeheus text format.
324
+This is intended for advanced use cases where you have servers
325
+exposing Prometheus metrics and need to get them into some other
326
+system.
327
328
+```
329
+from prometheus_client.parser import text_string_to_metric_families
330
+for family in text_string_to_metric_families("my_gauge 1.0\n"):
331
+ for sample in family.samples:
332
+ print("Name: {0} Labels: {1} Value: {2}".format(*sample))
333
334
335
0 commit comments