Tutorials
Developer Reference
Network utility functions.
is_loopback_address
Determine whether an address is a loopback address (e.g. 127.0.0.1).
address (str) – Address (can be IP or IP:port)
Boolean
is_local_address
Determine whether an address is a local (including loopback) IP address.
Adapted from stackoverflow.com/questions/166506.