import json def buildResponse(module, thread, mode): response = { "status": "success", "message": f"{module.name} dispatched", "thread": f"{thread}", "mode": f"{mode}", } #responsedata = json.dumps(response).encode("utf-8") return response