aboutsummaryrefslogtreecommitdiffstats
path: root/agents/demo/tools.py
blob: be8a773011e59a7b00ea6d0b5dd651aea5d0f35f (plain) (blame)
1
2
3
4
5
6
7
8
9
import urllib.request

def get_ipinfo():
  """
  Get the ip info
  """
  with urllib.request.urlopen("https://httpbin.org/ip") as response:
    data = response.read()
    return data.decode('utf-8')