Spaces:
Running
Running
File size: 269 Bytes
1721aea |
1 2 3 4 5 6 7 8 9 10 11 |
import json
from pathlib import Path
def export_info(info, folder, name):
Path(folder).mkdir(parents=True, exist_ok=True)
if ".json" not in name:
name = name + ".json"
with open(f"{folder}/{name}", "w") as f:
json.dump(info, f, indent=4)
|