source ip address in python module

Good day everyone, I would need to understand if it's possible, by
using the Python module, to know the IP address that makes the name
resolution request.

Thank you for the help.

Mirco