Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Metricz makes it easy to write metrics to a Kairosdb instance running with OAuth2 security.

Project Description


Metricz makes it easy to write metrics to a Kairosdb instance running with OAuth2 security.


  • OAuth2 support.
  • Option to batch write metrics at a later time.


To simply write a metric:

from metricz import MetricWriter

mw = MetricWriter(directory='/path/to/credentials/dir)

mw.write_metric('', 123, {'some': 'tag'})

To write a metric with a custom timestamp:

import datetime

# Make sure this is in UTC.
timestamp = datetime.datetime(1981, 10, 26, 6, 24)

mw.write_metric('', 34, {'some': 'tag'}, timestamp)

To batch write metrics:

# These are NOT written directly.
mw.defer_metric('', 42, {'some': 'tag'})
mw.defer_metric('', 64, {'some': 'tag'})
mw.defer_metric('', 64, {'some': 'tag'})

# Write all deferred metrics at once.


  • Retry on failure.
  • Look at non-blocking options to write.


0.1.0 (2016-08-03)

  • First release on PyPI.

Release History

This version
History Node

History Node

History Node

History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(6.3 kB) Copy SHA256 Hash SHA256
3.6 Wheel Dec 19, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting