bec_lib.connector.StoreInterface#
- class StoreInterface(store)[source]#
Bases:
ABC
StoreBase defines the interface for storing data
Methods
Delete a key
Execute a pipeline
Get a value
Get keys that match the pattern
Push a message to the left of the list
Get a range of values from the list
Set a value in the list at the given index
Create a pipeline for batch operations
Push a message to the right of the list
Set a value
Add a message to the stream
Read from the stream
Read from the stream
- abstract lpush(topic: str, msg: str, pipe=None, max_size: int | None = None, expire: int | None = None) None [source]#
Push a message to the left of the list
- abstract lrange(topic: str, start: int, end: int, pipe=None)[source]#
Get a range of values from the list
- abstract lset(topic: str, index: int, msg: str, pipe=None) None [source]#
Set a value in the list at the given index
- abstract rpush(topic: str, msg: str, pipe=None) int [source]#
Push a message to the right of the list
- abstract xadd(topic: str, msg_dict: dict, max_size=None, pipe=None, expire: int | None = None)[source]#
Add a message to the stream