PyDocs

Nav

Internet Protocols and Support

IPv4Address.is_private

``True`` if the address is defined as not globally reachable by
iana-ipv4-special-registry_ (for IPv4) or iana-ipv6-special-registry_
(for IPv6) with the following exceptions:

* ``is_private`` is ``False`` for ``100.64.0.0/10``
* For IPv4-mapped IPv6-addresses the ``is_private`` value is determined by the
    semantics of the underlying IPv4 addresses and the following condition holds
    (see :attr:`IPv6Address.ipv4_mapped`)::

        address.is_private == address.ipv4_mapped.is_private

``is_private`` has value opposite to :attr:`is_global`, except for the ``100.64.0.0/10``
IPv4 range where they are both ``False``.
Changed in 3.13
  • 3.13: Fixed some false positives and false negatives. 192.0.0.0/24 is considered private with the exception of 192.0.0.9/32 and 192.0.0.10/32 (previously: only the 192.0.0.0/29 sub-range was considered private). 64:ff9b:1::/48 is considered private. 2002::/16 is considered private. There are exceptions within 2001::/23 (otherwise considered private): 2001:1::1/128, 2001:1::2/128, 2001:3::/32, 2001:4:112::/48, 2001:20::/28, 2001:30::/28. The exceptions are not considered private.
0 Examples
No examples for ipaddress/IPv4Address.is_private.
See Also
No see-alsos for ipaddress/IPv4Address.is_private
0 Notes
No notes for IPv4Address.is_private