All Projects → RedisTimeSeries → redistimeseries-py

RedisTimeSeries / redistimeseries-py

Licence: BSD-3-Clause License
RedisTimeSeries python client

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to redistimeseries-py

redis-modules-java
Java client libraries for redis-modules https://redis.io/modules, based on Redisson. https://github.com/redisson/redisson
Stars: ✭ 57 (-40%)
Mutual labels:  timeseries, redis-client
hastic
Hastic standalone
Stars: ✭ 37 (-61.05%)
Mutual labels:  timeseries
bookvis
Sources of the book "Displaying time series, spatial and space-time data with R" (2nd Edition)
Stars: ✭ 52 (-45.26%)
Mutual labels:  timeseries
timecorr
Estimate dynamic high-order correlations in multivariate timeseries data
Stars: ✭ 30 (-68.42%)
Mutual labels:  timeseries
cpp redis
C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
Stars: ✭ 506 (+432.63%)
Mutual labels:  redis-client
phpRedisTimeSeries
📈 Use Redis Time Series in PHP!
Stars: ✭ 23 (-75.79%)
Mutual labels:  timeseries
simple redis
Simple and resilient redis client for rust.
Stars: ✭ 21 (-77.89%)
Mutual labels:  redis-client
vredis
Redis client for V, written in V
Stars: ✭ 43 (-54.74%)
Mutual labels:  redis-client
Redis-Monitoring
Solar power data ingestion and a monitoring dashboard using Redis as a primary database.
Stars: ✭ 16 (-83.16%)
Mutual labels:  redis-client
node-cache-manager-ioredis
Redis store for node-cache-manager using IORedis.
Stars: ✭ 47 (-50.53%)
Mutual labels:  redis-client
WeihanLi.Redis
RedisExtensions for StackExchange.Redis, Cache/Redlock/Counter/RateLimiter/Rank/RedisEventBus
Stars: ✭ 46 (-51.58%)
Mutual labels:  redis-client
redis-developer.github.io
The Home of Redis Developers
Stars: ✭ 28 (-70.53%)
Mutual labels:  redis-client
arima
ARIMA, SARIMA, SARIMAX and AutoARIMA models for time series analysis and forecasting in the browser and Node.js
Stars: ✭ 31 (-67.37%)
Mutual labels:  timeseries
rueidis
A Fast Golang Redis RESP3 client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, RedisAI, RedisGears, etc.
Stars: ✭ 422 (+344.21%)
Mutual labels:  redis-client
ARCHModels.jl
A Julia package for estimating ARMA-GARCH models.
Stars: ✭ 63 (-33.68%)
Mutual labels:  timeseries
jimhttp
A library collection and web microframework
Stars: ✭ 25 (-73.68%)
Mutual labels:  redis-client
pyts-repro
A repository to compare the performance between the algorithms implemented in pyts and the performance reported in the literature
Stars: ✭ 15 (-84.21%)
Mutual labels:  timeseries
spring-redisearch
Provides support for RediSearch in Spring
Stars: ✭ 31 (-67.37%)
Mutual labels:  redis-client
grafana-redis-app
Redis Application for @grafana provides Application pages and custom panels for Redis Data Source.
Stars: ✭ 23 (-75.79%)
Mutual labels:  redis-client
TimeSeriesPrediction
Time Series Prediction, Stateful LSTM; 时间序列预测,洗发水销量/股票走势预测,有状态循环神经网络
Stars: ✭ 34 (-64.21%)
Mutual labels:  timeseries

license PyPI version CircleCI GitHub issues Codecov Language grade: Python Known Vulnerabilities

redistimeseries-py

Forum Discord

Deprecation notice

As of redis-py 4.0.0 this library is deprecated. It's features have been merged into redis-py. Please either install it from pypy or the repo.


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

  1. Create a virtualenv to manage your python dependencies, and ensure it's active. virtualenv -v venv
  2. Install pypoetry to manage your dependencies. pip install poetry
  3. 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, -1, aggregation_type='avg', bucket_size_msec=10)
rts.range('test', 0, -1, aggregation_type='sum', bucket_size_msec=10)
rts.info('test').__dict__

# Example with rules
rts.create('source', retention_msecs=40)
rts.create('sumRule')
rts.create('avgRule')
rts.createrule('source', 'sumRule', 'sum', 20)
rts.createrule('source', 'avgRule', 'avg', 15)
rts.add('source', '*', 1)
rts.add('source', '*', 2)
rts.add('source', '*', 3)
rts.get('sumRule')
rts.get('avgRule')
rts.info('sumRule').__dict__

Further notes on back-filling time series

Since RedisTimeSeries 1.4 we've added the ability to back-fill time series, with different duplicate policies.

The default behavior is to block updates to the same timestamp, and you can control it via the duplicate_policy argument. You can check in detail the duplicate policy documentation.

Bellow you can find an example of the LAST duplicate policy, in which we override duplicate timestamps with the latest value:

from redistimeseries.client import Client
rts = Client()
rts.create('last-upsert', labels={'Time':'Series'}, duplicate_policy='last')
rts.add('last-upsert', 1, 10.0)
rts.add('last-upsert', 1, 5.0)
# should output [(1, 5.0)]
print(rts.range('last-upsert', 0, -1))

License

BSD 3-Clause

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].