instrument subscribes to the Python batteries-included philosophy. It ships with support for a number of different metric backends, and eventually instrumentation for popular packages. Since most users will want only a subset of this functionality, optional dependencies are not installed by default.

Note that the included requirements.txt file includes all depedencies (for build/test purposes), and is almost certainly not what you want.


To install the base package (with no depedencies beyond the standard library):

pip install instrument

This includes: all generic measurement functions, print_metric() and csv metrics.

Batteries Included

You should have completed the minimal install already. To install the dependencies for an optional component, specify it in brackets with --upgrade:

pip install --upgrade instrument[statsd]

The following extra targets are supported:

  • statsd: statsd metric
  • table: statistics tables
  • plot: graphs of metrics, based on matplotlib. You’ll need the agg backend.