find server name for ip address code example
Example 1: windows give an ip address a name
edit as an administrator:
C:\Windows\system32\drivers\etc\hosts
192.168.0.13 raspberry
Example 2: get hostname
socket.gethostbyname(socket.gethostname())