API
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled

This commit is contained in:
2025-12-01 13:27:54 +01:00
parent 0bfc2fd9c5
commit a7fe9d8614
2 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
from datetime import datetime, timedelta
import os
import os.path
from pathlib import Path
import time
@@ -69,5 +70,9 @@ class FileCache():
log('adding filecacheobject ' + key)
json_data = JsonEncoder().encode(obj)
# json_data = json.dumps(obj, cls=JsonEncoder, indent=2)
# Ensure the filecache directory exists
os.makedirs("./filecache", exist_ok=True)
with open("./filecache/" + key + ".json", 'w+') as f:
f.write(json_data)