# Copyright (C) 2026 BoundWare LLC. All rights reserved.
# SnacTrac is licensed under the Apache License, Version 2.0
# See Licenses/LICENSE.txt for details.


import yaml


# Set setting value.
def set_value_setting(setting, value):

    path_settings = "Data/Settings.yaml"

    with open(path_settings, "r") as file:

        data = yaml.safe_load(file)

    data[setting] = value

    with open(path_settings, "w") as file:

        yaml.safe_dump(data, file)
