Skip to content

coderanger/client_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus Python Client

This is a first pass at a Python client for Prometheus.

Installation

easy_install prometheus_client

Example Usage

  c = Counter('cc', 'A counter')
  c.inc()

  g = Gauge('gg', 'A gauge')
  g.set(17)

  s = Summary('ss', 'A summary', ['a', 'b'])
  s.labels('c', 'd').observe(17)

  from BaseHTTPServer import HTTPServer
  server_address = ('', 8000)
  httpd = HTTPServer(server_address, MetricsHandler)
  httpd.serve_forever()

About

Prometheus instrumentation library for Python applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%