Module spin_sdk.redis

Module for interacting with a Redis database

Functions

def open(connection_string: str) ‑> Connection

Open a connection with a Redis database.

The connection_string is the Redis URL to connect to.

A Err(Error_InvalidAddress) will be raised if the connection string is invalid.

A Err(Error_TooManyConnections) will be raised if there are too many open connections. Closing one or more previously opened connection using the __exit__ method might help.

A Err(Error_Other(str)) when some other error occurs.