findig.extras.redis — Some tools that are backed by Redis

Note

This module requires redis-py and will raise an ImportError if redis-py is not installed.

class findig.extras.redis.RedisSet(key=None, client=None, index_size=4)[source]

Bases: findig.tools.dataset.MutableDataSet

A RedisSet is an AbstractDataSet that stores its items in a Redis database (using a Sorted Set to represent the collection, and a sorted set to represent items).

Parameters:
  • key – The base key that should be used for the sorted set. If not given, one is deterministically generated based on the current resource.
  • client – A redis.StrictRedis instance that should be used to communicate with the redis server. If not given, a default instance is used.
  • index_size – The number of bytes to use to index items in the set (per item).