from torrequest import TorRequest

with TorRequest(proxy_port = 9050, ctrl_port = 9051, password = None) as tr:
    response = tr.get('http://ipecho.net/plain')
    print(response.text)  
    print(type(tr.ctrl))
    tr.ctrl.signal('CLEARDNSCACHE')
    tr.reset_identity()
    response = tr.get('http://ipecho.net/plain')
    print(response.text)