@michalt38 OK. Then you'll need two steps:
First, you have to connect the WiPy to the network. That's done with wlan.connect, as given in my sample scripts.
Second: you have to write a little program for you WiPy and your PC that connects through sockets and sends the data. The IP adresses used are those of the WiPy and the PC, not the one of the router. You have to define which entity connects (socket.connect() ) and which entity accepts (socket.accept()).
For initial testing, you can use for the PC side netcat (nc), which is a simple raw socket send/receive program.
Examples for the WIPy side are here: https://docs.python.org/3/howto/sockets.html
or here: https://www.tutorialspoint.com/python3/python_networking.htm
@robert-hh Yes, it's important what Robert writes! The kind of connection--and IP(!!)--is related to the network the WiPy is connected. In case the WiPy is started default it will start as access point. In this case the IP is 192.168.1.1 In case you have connected the WiPy to a home network and the WiPy is now a station and not an access point any more, the device gets the IP from the network. I had a look at my Fritz box dashboard and could so figure out the IP but I think you can also gather the IP via a serial connection?