Module spin_sdk.wit.imports.fermyon_spin_redis
Functions
def del_(address: str, keys: List[str]) ‑> int-
Expand source code
def del_(address: str, keys: List[str]) -> int: """ Removes the specified keys. A key is ignored if it does not exist. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorRemoves the specified keys. A key is ignored if it does not exist.
Raises:
componentize_py_types.Err(Error) def execute(address: str,
command: str,
arguments: List[RedisParameter_Int64 | RedisParameter_Binary]) ‑> List[RedisResult_Nil | RedisResult_Status | RedisResult_Int64 | RedisResult_Binary]-
Expand source code
def execute(address: str, command: str, arguments: List[fermyon_spin_redis_types.RedisParameter]) -> List[fermyon_spin_redis_types.RedisResult]: """ Execute an arbitrary Redis command and receive the result. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorExecute an arbitrary Redis command and receive the result.
Raises:
componentize_py_types.Err(Error) def get(address: str, key: str) ‑> bytes-
Expand source code
def get(address: str, key: str) -> bytes: """ Get the value of a key. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorGet the value of a key.
Raises:
componentize_py_types.Err(Error) def incr(address: str, key: str) ‑> int-
Expand source code
def incr(address: str, key: str) -> int: """ Increments the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorIncrements the number stored at key by one. If the key does not exist, it is set to 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.
Raises:
componentize_py_types.Err(Error) def publish(address: str, channel: str, payload: bytes) ‑> None-
Expand source code
def publish(address: str, channel: str, payload: bytes) -> None: """ Publish a Redis message to the specificed channel and return an error, if any. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorPublish a Redis message to the specificed channel and return an error, if any.
Raises:
componentize_py_types.Err(Error) def sadd(address: str, key: str, values: List[str]) ‑> int-
Expand source code
def sadd(address: str, key: str, values: List[str]) -> int: """ Add the specified `values` to the set named `key`, returning the number of newly-added values. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorAdd the specified
valuesto the set namedkey, returning the number of newly-added values.Raises:
componentize_py_types.Err(Error) def set(address: str, key: str, value: bytes) ‑> None-
Expand source code
def set(address: str, key: str, value: bytes) -> None: """ Set key to value. If key alreads holds a value, it is overwritten. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorSet key to value. If key alreads holds a value, it is overwritten.
Raises:
componentize_py_types.Err(Error) def smembers(address: str, key: str) ‑> List[str]-
Expand source code
def smembers(address: str, key: str) -> List[str]: """ Retrieve the contents of the set named `key`. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorRetrieve the contents of the set named
key.Raises:
componentize_py_types.Err(Error) def srem(address: str, key: str, values: List[str]) ‑> int-
Expand source code
def srem(address: str, key: str, values: List[str]) -> int: """ Remove the specified `values` from the set named `key`, returning the number of newly-removed values. Raises: `componentize_py_types.Err(spin_sdk.wit.imports.fermyon_spin_redis_types.Error)` """ raise NotImplementedErrorRemove the specified
valuesfrom the set namedkey, returning the number of newly-removed values.Raises:
componentize_py_types.Err(Error)