mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-10 12:08:52 -06:00
16 lines
424 B
Python
16 lines
424 B
Python
"""
|
|
data.py
|
|
|
|
Manages API quote/character data, caching static responses and reloading from disk.
|
|
"""
|
|
import os
|
|
import json
|
|
|
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
with open(os.path.join(BASE_DIR, 'data', 'data.json'), 'r', encoding='utf-8') as file:
|
|
data = json.load(file)
|
|
|
|
with open(os.path.join(BASE_DIR, 'data', 'characters.json'), 'r', encoding='utf-8') as file:
|
|
character_data = json.load(file)
|
|
|