Python Get Public Ip Address

[Solved] Python Get Public Ip Address | Python - Code Explorer | yomemimo.com
Question : python get public ip address

Answered by : beautiful-bear-k4ijiv8g3hdn

from requests import get
ip = get('https://api.ipify.org').text
print(f'My public IP address is: {ip}')

Source : | Last Update : Tue, 16 Mar 21

Question : get external ip python

Answered by : joeyeyey

# This example requires the requests library be installed. You can learn more
# about the Requests library here: http://docs.python-requests.org/en/latest/
from requests import get
ip = get('https://api.ipify.org').text
print 'My public IP address is:', ip

Source : https://stackoverflow.com/questions/2311510/getting-a-machines-external-ip-address-with-python | Last Update : Wed, 16 Sep 20

Answers related to python get public ip address

Code Explorer Popular Question For Python