File size: 330 Bytes
f96dc39
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import json
import pkgutil
from pathlib import Path

def load_json(filename: str) -> dict:
    data_path = Path(__file__).parent / "data" / filename
    with open(data_path) as f:
        return json.load(f)

# Once, at app startup:
FEELINGS_WHEEL = load_json("feelings_wheel.json")
NEEDS_WHEEL    = load_json("needs_wheel.json")