finchan.interface.kvstore¶
kvstore Interface, inspired by redis-py.
AbsKvStore¶
-
class
finchan.interface.kvstore.
AbsKvStore
(*args, **kwargs)[source]¶ KV store interface
init the kvstore connection
-
mset
(*args, **kwargs)[source]¶ Sets key/values based on a mapping. Mapping can be supplied as a single dictionary argument or as kwargs.
-
hset
(name, key, value)[source]¶ Set key to value within hash name.
Returns 1 if HSET created a new field, otherwise 0.
-
hmset
(name, mapping)[source]¶ Set key to value within hash
name
for each corresponding key and value from themapping
dict.
-
hsetnx
(name, key, value)[source]¶ Set key to value within hash name if key does not exist.
Returns 1 if HSETNX created a field, otherwise 0.
-
lrange
(name, start, end)[source]¶ Return a slice of the list
name
between positionstart
andend
.start
andend
can be negative numbers just like Python slicing notation.
-