bayesline.api.ReadOnlyRegistry#
- class bayesline.api.ReadOnlyRegistry#
-
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.
Returns A dictionary of all available settings metadata (valid or invalid).
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 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 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 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 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 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.
- get_all_with_metadata() dict[str, tuple[T, SettingsMetaData]] #
Returns#
A dictionary of all valid available settings with metadata.
- get_all_metadata() dict[str, SettingsMetaData] #
Returns#
A dictionary of all available settings metadata (valid or invalid).