0

I'm trying to get used to the redis-py Python module. I just can't figure out how the "mrange" function has to be used to get one or more Time-Series by its labels.

In the CLI it looks like this and it works:

TS.MRANGE - + FILTER area_id=32

But I can't get it to work in Python (one of many things that I tried):

import redis

r = redis.Redis()

r.ts().mrange("-","+","area_id:32")
r.ts().mrange("-","+",filters="area_id:32")
r.ts().mrange("-","+",filters='{area_id}32')

#And I tried many more...

I get the following Error:

ResponseError: TSDB: failed parsing labels
TarX-
  • 3
  • 2

1 Answers1

0

r.ts().mrange('-','+',['area_id=32'])

you need [square brackets]

georgem
  • 50
  • 2