You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's true; we can add more complicated real-life examples. However, the package is also used by a significant number of open-source Python applications that are publicly available.
Please let us know if you have anything particular you would like to see in the docs.
Yes, I would like to see API docs as well. Examples are fine, but you need to document the API. For example, creating a Gauge instance: the example given under the Gauge page doesn't document all the parameters that can be passed to the Gauge constructor, nor supplementary methods you can call like .labels.
Another vote for publishing a full API documentation (even just an auto-generated one).
More simply, I also suggest adding to the main "Getting Started" page links to a handful of those publicly available open-source applications using this API as real-world examples. The main Prometheus documentation includes links to many examples, but does not differentiate what language they are written in (most are in Go), making it difficult to find relevant Python-based examples.
my current use case would be that i'm looking at scripts here: https://github.com/prometheus-community/node-exporter-textfile-collector-scripts and they use functions and classes that are not mentioned in the examples. a complete inventory of the API would enable me to find what i need to solve my problems w/o reading the source code.
That sounds great! The first two are the most important for this library, if anything for the explanations of which metric types/getting started pointing to the core prometheus docs would make sense.
Hi @csmarchbanks, I'd like to pick this up! I see there was interest earlier, but no PR has been opened. I can start with the structured API reference for Counter, Gauge, Histogram, and Summary with real-world usage examples. Happy to coordinate if someone else is actively working on it :)
Activity
kakkoyun commentedon Apr 8, 2024
Thanks for reaching out.
That's true; we can add more complicated real-life examples. However, the package is also used by a significant number of open-source Python applications that are publicly available.
Please let us know if you have anything particular you would like to see in the docs.
Azmisov commentedon May 14, 2024
Yes, I would like to see API docs as well. Examples are fine, but you need to document the API. For example, creating a
Gaugeinstance: the example given under the Gauge page doesn't document all the parameters that can be passed to the Gauge constructor, nor supplementary methods you can call like.labels.Digicrat commentedon May 29, 2024
Another vote for publishing a full API documentation (even just an auto-generated one).
More simply, I also suggest adding to the main "Getting Started" page links to a handful of those publicly available open-source applications using this API as real-world examples. The main Prometheus documentation includes links to many examples, but does not differentiate what language they are written in (most are in Go), making it difficult to find relevant Python-based examples.
funkyfuture commentedon Aug 21, 2024
my current use case would be that i'm looking at scripts here: https://github.com/prometheus-community/node-exporter-textfile-collector-scripts and they use functions and classes that are not mentioned in the examples. a complete inventory of the API would enable me to find what i need to solve my problems w/o reading the source code.
AnannyaMahajan commentedon Jan 15, 2026
Hi 👋
I’m preparing for GSoC and would love to help improve the documentation here.
I was thinking of adding:
Please let me know if this sounds good, or if you’d prefer a different focus.
csmarchbanks commentedon Jan 22, 2026
That sounds great! The first two are the most important for this library, if anything for the explanations of which metric types/getting started pointing to the core prometheus docs would make sense.
Thanks!
kkukadia commentedon Mar 31, 2026
Hi @csmarchbanks, I'd like to pick this up! I see there was interest earlier, but no PR has been opened. I can start with the structured API reference for Counter, Gauge, Histogram, and Summary with real-world usage examples. Happy to coordinate if someone else is actively working on it :)
csmarchbanks commentedon Mar 31, 2026
👍 I don't know of anyone else working on it (haven't seen anything from the above person) so please feel free to start!
docs: add API reference for all metric types
kkukadia commentedon Apr 6, 2026
Hey @csmarchbanks, made the PR and it's waiting for review :)
docs: add API reference for all metric types
docs: add API reference for all metric types (prometheus#1159)