File size: 271 Bytes
d6dec4f
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import yaml, json

def load_rules(path="RULEBOOK.yaml"):
    with open(path, "r", encoding="utf-8") as f:
        rules = yaml.safe_load(f)

    with open("artifacts/normalized_rules.json", "w") as out:
        json.dump(rules, out, indent=2)

    return rules