j5.boards.board_group module¶
Board Group class.
-
class
j5.boards.board_group.
BoardGroup
(backend_class: Type[U])[source]¶ Bases:
typing.Generic
A group of boards that can be accessed.
-
backend_class
¶ The Backend that this group uses for Boards.
Returns: The backend used to interact with boards.
-
boards
¶ Get an unordered list of boards in this group.
Returns: unordered list of boards in this group.
-
classmethod
get_board_group
(_: Type[T], backend: Type[U]) → j5.boards.board_group.BoardGroup[~T, ~U][T, U][source]¶ Get the board group with the given types.
Whilst the first parameter value is not actually used in the function, we need it for typing purposes. This is similar to how a ProxyType works in Haskell.
Parameters: backend – The class of backend to get. Returns: A BoardGroup containing all of the backends of the requested type.
-
singular
() → T[source]¶ If there is only a single board in the group, return that board.
Returns: The instance of the only board in the group. Raises: CommunicationError – Multiple boards were found.
-