This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: utils.localinterfaces

Simple utility for building a list of local IPs using the socket module. This module defines two constants:

LOCALHOST : The loopback interface, or the first interface that points to this
machine. It will almost always be ‘’
LOCAL_IPS : A list of IP addresses, loopback first, that point to this machine.
This will include LOCALHOST, PUBLIC_IPS, and aliases for all hosts, such as ‘’.
PUBLIC_IPS : A list of public IP addresses that point to this machine.
Use these to tell remote clients where to find you.

1 Class

class IPython.utils.localinterfaces.NoIPAddresses

Bases: Exception

5 Functions

IPython.utils.localinterfaces.local_ips(*args, **kwargs)
IPython.utils.localinterfaces.public_ips(*args, **kwargs)
IPython.utils.localinterfaces.localhost(*args, **kwargs)
IPython.utils.localinterfaces.is_local_ip(*args, **kwargs)
IPython.utils.localinterfaces.is_public_ip(*args, **kwargs)