Config Module

This module contains definitions for the configuration of Berrymon.

class berrymon.config.Config[source]

Bases: object

This class represents a configuration for Berrymon with information like the API host address or the address of an LCD display that’s meant to be used by Berrymon.

Variables:
  • host (str) – The API host address.
  • port (int) – The API port.
  • enable_lcd (bool) – Determines if an LCD display should be used or not.
  • lcd_address – The address of a connected display.
  • lcd_bus – The bus number of a display is connected to.
  • lcd_lines – The amount of lines on a connected display.
  • lcd_line_length – The line length of a connected display.
load_from_file(path: str)[source]

Loads configuration values from a JSON file specified by the path.

Parameters:path (str) – The path of the JSON configuration file.
save_to_file(path: str)[source]

Saves the current configuration to a JSON file specified by the path

Parameters:path (str) – The path of the JSON configuration file.