Category Archives: RRDtool

python-rrdtool 0.1.3 released

Today I’ve released python-rrdtool version 0.1.3, which fixes some bugs when building the module in build environments that do not have specific rrdtool build headers included. Now all the graph and xport functions are available again.

To update or install, use pip:

pip install -U rrdtool

There are some discussions going on about the number of Python bindings for rrdtool. The version I’ve created is just one of a few, and was probably the first one that offered Python 3.x support. Some people were asking if it may be possible to get this merged into the regular rrdtool distribution. It might be. But from a certain point of view I think it’s a better approach to distribute the bindings via PyPI, because it’s more pythonic, and it allows building for multiple Python versions at once.

python-rrdtool now available on PyPI

python-rrdtool is now available on PyPI. This simplifies the installation of the rrdtool bindings for Python when using pip or easy_install.

To install, you can simply use the following command:

# pip install rrdtool

python-rrdtool is a Python binding for rrdtool. It’s based on the original Python rrdtool binding distributed with the source code of rrdtool. This bindings work with Python 2.6+ and 3.3+.

python-rrdtool 0.1.1 released

An update to python-rrdtool was released today. Version 0.1.1 adds support for Python 2.x and fixes some minor issues that came up when porting the original Python binding for Python 3.

You can find more information at the project page on Github.


The installation of the module is pretty easy. All you need is to have rrdtool installed (and its headers) and of course the header files for your Python version.

Assuming you want to install it via pip, use

# pip install

You can also install it from sources by downloading the source and run

# python install

About python-rrdtool

python-rrdtool is a Python binding for rrdtool. It works with both Python 2.x and 3.x and comes with an object-oriented interface as well.

rrdtool-py3k: Python 3 bindings for rrdtool

As I started to port some code from Python 2 to Python 3 I had a problem that probably thousands of developers may have: A third-party library they require is not ported to Python 3 yet.

To support the community I’ve ported the Python bindings for rrdtool to use with Python 3. Its based on the original binding and should work almost the same as the old one, but got some improvements:

  • Updated documentation contents (__doc__) of each of the functions
  • The graph function can now return the actual image from function rather requiring to write it to a file. This is possible because the rrdtool program has the ability to specify “-” as the output file which will print the image bytes to stdout. The binding stores the data written to stdout and returns it along with the graph geometry as a bytes object.
  • An object-oriented interface was added. While the C extension can be imported withimport rrdtool, you can import the object-oriented interface with import RRDtool. The interface offers a class that can work with RRD files and execute all the rrdtool functions directly on arbitrary instances. Again, the graph method of the RRD class supports writing the output into files or to a BytesIO object.

The library is not well tested and considered being buggy. I’d like to encourage everyone interested into it to test it and submit bugs to the issue tracker on the Github project page.

Pre-compiled Windows binaries

The binaries are built with rrdtool 1.4.7 and MSVC 10.0. Please note that the output redirection mentioned in the feature list above is not available under Windows yet. Additionally, the flushcached function will have no effect, since I wasn’t able to compile the libraries when using that function from rrdlib. Use the appropriate architecture and Python version listed in the list below.