streamsight.registries.AlgorithmRegistry

class streamsight.registries.AlgorithmRegistry

Bases: Registry

Registry for easy retrieval of algorithm types by name.

The registry comes preregistered with all streamsight algorithms.

__init__()

Methods

__init__()

get(key)

Retrieve the value for this key.

register(key, c)

Register a new Python type (most often a class).

get(key: str) type

Retrieve the value for this key. This value is a Python type (most often a class).

Parameters:

key (str) – The key to fetch

Returns:

The class type associated with the key

Return type:

type

register(key: str, c: type)

Register a new Python type (most often a class).

After registration, the key can be used to fetch the Python type from the registry.

Parameters:
  • key (str) – key to register the type at. Needs to be unique to the registry.

  • c (type) – class to register.