bayesline.api.AsyncReadOnlyRegistry#

class bayesline.api.AsyncReadOnlyRegistry#

Bases: ABC, Generic[T]

Methods

__init__()

get(name)

Parameters name str | int The unique name or int identifier of the item to retrieve.

get_all()

Returns A dictionary of all valid available settings.

get_all_metadata()

Returns A dictionary of all available settings metadata, valid or invalid.

get_all_with_metadata()

Returns A dictionary of all valid available settings with metadata.

get_metadata(name)

Parameters name str | int The unique name or int identifier of the item to retrieve.

get_raw(name_or_id)

Parameters name_or_id list[str | int] The unique names or int identifiers of the items to retrieve.

ids([mode])

Parameters mode Mode The mode to use when retrieving the ids.

names([mode])

Parameters mode Mode The mode to use when retrieving the ids.

abstract async ids(mode: Literal['All', 'Valid', 'Invalid'] = 'Valid') dict[int, str]#

Parameters#

modeMode

The mode to use when retrieving the ids.

Returns#

A dictionary of the unique identifiers to the unique names.

abstract async names(mode: Literal['All', 'Valid', 'Invalid'] = 'Valid') dict[str, int]#

Parameters#

modeMode

The mode to use when retrieving the ids.

Returns#

A dictionary of the unique names to the unique identifiers.

abstract async get_raw(name_or_id: list[str | int]) list[RawSettings]#

Parameters#

name_or_idlist[str | int]

The unique names or int identifiers of the items to retrieve.

Returns#

A list of RawSettings in the same order as input.

abstract async get(name: str | int) T#

Parameters#

namestr | int

The unique name or int identifier of the item to retrieve.

Raises#

KeyError

If the item does not exist.

InvalidSettingsError:

If the item exists but is invalid.

Returns#

The item for the given name.

abstract async get_metadata(name: str | int) SettingsMetaData#

Parameters#

namestr | int

The unique name or int identifier of the item to retrieve.

Raises#

KeyError

If the item does not exist.

Returns#

The metadata for the given name.

async get_all() dict[str, T]#

Returns#

A dictionary of all valid available settings.

async get_all_with_metadata() dict[str, tuple[T, SettingsMetaData]]#

Returns#

A dictionary of all valid available settings with metadata.

async get_all_metadata() dict[str, SettingsMetaData]#

Returns#

A dictionary of all available settings metadata, valid or invalid.