Modified version of Librato's python library.