import websockets
import asyncio

async def server(websocket, path):
    while (True):
        data = await websocket.recv()

        print("Message received: ", data)

        await websocket.send("Thanks for your message")

start_server = websockets.serve(server, "localhost", 55055)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()