Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

103 lines (71 sloc) 2.78 KB

Kairos - Time series data storage in Redis

Version: 0.0.7
Keywords:python, redis, time, rrd, gevent


Kairos provides time series storage using a Redis backend. Kairos is intended to replace RRD in situations where the scale of Redis is required, with as few dependencies on other packages as possible. It should work with gevent out of the box.

Requires python 2.7 or later.


Install redis and kairos.

from kairos import Timeseries
import redis

client = redis.Redis('localhost', 6379)
t = Timeseries(client, {
    'step':60,            # 60 seconds
    'steps':120,          # last 2 hours
    'read_cast' : float,  # cast all results as floats

t.insert('example', 3.14159)
t.insert('example', 2.71828)
print t.get('example', 'minute')

Each retrieval function will by default return an ordered dictionary, though condensed results are also available. Run script/example to see standard output; watch -n 4 script/example is a useful tool as well.


Kairos achieves its efficiency by using Redis' TTLs and data structures in combination with a key naming scheme that generates consistent keys based on any timestamp relative to epoch. However, just like RRDtool, changing any attribute of the timeseries means that new data will be stored differently than old data. For this reason it's best to completely delete all data in an old time series before creating or querying using a new configuration.


Kairos is available on pypi and can be installed using pip

pip install kairos

If installing from source:

  • with development requirements (e.g. testing frameworks)

    pip install -r development.pip
  • without development requirements

    pip install -r requirements.pip

Note that kairos does not by default require the redis package, nor does it require hiredis though it is strongly recommended.


  • Tests
  • Documentation
  • Refactoring
  • Storage of objects
  • Histograms for compressing large intervals
  • Interfaces to support easy integration with Python statistics packages
  • Pipelining and other redis optimizations


This software is licensed under the New BSD License. See the LICENSE.txt file in the top distribution directory for the full license text.

Jump to Line
Something went wrong with that request. Please try again.