from network_api import NetworkAPI import time if __name__ == "__main__": network_api = NetworkAPI(('localhost', 9998)) message = '233ok' address = ('localhost', 10000) data = { "type": "client_append_entries", "timestamp": int(time.time()), "message": message, } print("send: ", data) network_api.send(data, address)