Spaces:
Sleeping
Sleeping
File size: 396 Bytes
463f868 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import json
import os
path = "engine/data/cards_compiled.json"
if os.path.exists(path):
with open(path, "r", encoding="utf-8") as f:
data = json.load(f)
m = len(data.get("member_db", {}))
l = len(data.get("live_db", {}))
e = len(data.get("energy_db", {}))
print(f"Members: {m}, Lives: {l}, Energy: {e}")
else:
print("File not found")
|