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 NotImplementedError

Removes 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 NotImplementedError

Execute 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 NotImplementedError

Get 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 NotImplementedError

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(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 NotImplementedError

Publish 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 NotImplementedError

Add the specified values to the set named key, 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 NotImplementedError

Set 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 NotImplementedError

Retrieve 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 NotImplementedError

Remove the specified values from the set named key, returning the number of newly-removed values.

Raises: componentize_py_types.Err(Error)