Работа с YAML

class openav.modules.file_manager.yaml_manager.YamlMessages(path_to_logs: str = <property object>, lang: str = <property object>)[source]

Bases: Json

Класс для сообщений

Parameters:
  • path_to_logs (str) – Смотреть path_to_logs

  • lang (str) – Смотреть lang

class openav.modules.file_manager.yaml_manager.Yaml(path_to_logs: str = <property object>, lang: str = <property object>)[source]

Bases: YamlMessages

Класс для работы с YAML

Parameters:
  • path_to_logs (str) – Смотреть path_to_logs

  • lang (str) – Смотреть lang

load_yaml(path_to_file: str, create: bool = False, out: bool = True) Dict[str, bool | int | float | str][source]

Загрузка YAML файла

Parameters:
  • path_to_file (str) – Путь к файлу YAML

  • create (bool) – Создание файла YAML в случае его отсутствия

  • out (bool) – Печатать процесс выполнения

Returns:

Словарь из yaml файла

Return type:

Dict[str, Union[str, bool, int, float]]

load_yaml_resources(module: module, path_to_file: str, out: bool = True) Dict[str, bool | int | float | str][source]

Загрузка YAML файла из ресурсов модуля

Parameters:
  • module (ModuleType) – Модуль

  • path_to_file (str) – Путь к файлу YAML

  • out (bool) – Печатать процесс выполнения

Returns:

Словарь из yaml файла

Return type:

Dict[str, Union[str, bool, int, float]]