Answers for "how to get user ip address in request in python"

2

how to get user ip in python

import socket    
host_name = socket.gethostname()    
IPAddress = socket.gethostbyname(host_name)    
print("Your Computer Name is:" + host_name)    
print("Your Computer IP Address is:" + IPAddress) 
#How to get the IP address of a client using socket module
Posted by: Guest on July-16-2020

Code answers related to "how to get user ip address in request in python"

Python Answers by Framework

Browse Popular Code Answers by Language