jinks_core.configuration¶
Parses the jinks_core yaml config file and returns a JinksConfig object.
Classes
|
Reads configuration file. |
|
User Specified widget representation at configuration level. |
|
Widget position. |
Exceptions
Configuration Error. |
- exception jinks_core.configuration.JinksConfigurationError¶
Bases:
JinksErrorConfiguration Error.
- class jinks_core.configuration.Position(x, y)¶
Bases:
objectWidget position.
- x: int¶
- y: int¶
- __init__(x, y)¶
- class jinks_core.configuration.ConfigurationWidget(name, position, data_group_name, is_data_group_master, data_interval, data_args, display_args)¶
Bases:
objectUser Specified widget representation at configuration level.
- name: str¶
- data_group_name: str | None¶
- is_data_group_master: bool¶
- data_interval: timedelta | None¶
- data_args: dict¶
- display_args: dict¶
- static from_dict(name, _dict)¶
Get the instance of ConfigurationWidget from a dictionary with name.
- Return type:
- static from_list(_list)¶
Get all instances of ConfigurationWidget from a list.
- Return type:
list[ConfigurationWidget]
- __init__(name, position, data_group_name, is_data_group_master, data_interval, data_args, display_args)¶
- class jinks_core.configuration.Configuration(device_name, display_name, orientation_name, invert, full_refresh_interval, partial_refresh_interval, sentry_dsn, sentry_environment, sentry_release, widgets)¶
Bases:
objectReads configuration file.
- __init__(device_name, display_name, orientation_name, invert, full_refresh_interval, partial_refresh_interval, sentry_dsn, sentry_environment, sentry_release, widgets)¶
- device_name: str¶
- display_name: str¶
- orientation_name: str | None¶
- invert: bool¶
- full_refresh_interval: timedelta¶
- partial_refresh_interval: timedelta | None¶
- sentry_dsn: str | None¶
- sentry_environment: str | None¶
- sentry_release: str | None¶
- widgets: list[ConfigurationWidget]¶
- classmethod from_yaml(config_path)¶
Get the instance of Configuration for a YAML file.
- Return type:
- static from_dict(_dict)¶
Get the instance of Configuration for a dictionary.
- Return type: