Skip to main content

Time series data storage using Redis

Project description

Version:
0.0.4
Download:

http://pypi.python.org/pypi/kairos

Source:

https://github.com/agoragames/kairos

Keywords:

python, redis, time, rrd, gevent

Overview

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.

Usage

Install redis and kairos.

from kairos import Timeseries
import redis

client = redis.Redis('localhost', 6379)
t = Timeseries(client, {
  'minute':{
    '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.

Installation

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.

Future

  • Tests!

  • Storage of objects

  • Histograms for compressing large intervals

  • Interfaces to support easy integration with Python statistics packages

  • Pipelining and other redis optimizations

License

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

Project details


Download files

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

Source Distribution

kairos-0.0.4.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file kairos-0.0.4.tar.gz.

File metadata

  • Download URL: kairos-0.0.4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kairos-0.0.4.tar.gz
Algorithm Hash digest
SHA256 176046c11ee28534782cf039d9237ac8388dc585fdff022131c4978940378ce1
MD5 373345d9981ccc4556f394de182e78c4
BLAKE2b-256 db198385ea4139245bbe79abda9bb9805976de22b537b443dd8e2c6017056420

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page