Port of redis-timeseries to Python