This is modifid library from https://github.com/KebabLord/esp_to_python . I have edited some functions to get data two ways.
This is project to communicate between node mcu and python through wifi and send data two-ways, without have to wait and perform other task like normal function in arduino and python.
This example code is using url library to send and receive data. But must change IP in pyhton.You can also access the ip from browser. i.e 192.168.10.1/one in browser
Create a folder in arduino/library name esp_wahaj and paste all the files there.