import urllib.request def do_stuff(): urllib.request.urlopen('https://www.ansible.com/')