A package that gives developers easy access to RedisTimeSeries module
redistimeseries-py
redistimeseries-py is a package that gives developers easy access to RedisTimeSeries module. The package extends redis-py’s interface with RedisTimeSeries’s API.
Installation
$ pip install redistimeseries
Development
- Create a virtualenv to manage your python dependencies, and ensure it’s active.
virtualenv -v venv
- Install pypoetry to manage your dependencies.
pip install poetry
- Install dependencies.
poetry install
tox runs all tests as its default target. Running tox by itself will run unit tests. Ensure you have a running redis, with the module loaded.
API
The complete documentation of RedisTimeSeries’s commands can be found at RedisTimeSeries’s website.
Usage example
# Simple example
from redistimeseries.client import Client
rts = Client()
rts.create('test', labels={'Time':'Series'})
rts.add('test', 1, 1.12)
rts.add('test', 2, 1.12)
rts.get('test')
rts.incrby('test',1)
rts.range('test', 0, -1)
rts.range('test', 0,