:mod:`ipaddress`
================
.. py:module:: ipaddress
.. autoapi-nested-parse::
The `ipaddress` module provides types for IP addresses. It is a subset of CPython's ipaddress
module.
.. raw:: html
Available on these boards
- AITHinker ESP32-C3S_Kit
- ATMegaZero ESP32-S2
- Adafruit Feather ESP32-S2 TFT
- Adafruit Feather ESP32S2
- Adafruit FunHouse
- Adafruit MagTag
- Adafruit Metro ESP32S2
- Adafruit QT Py ESP32S2
- Artisense Reference Design RD00
- BastWiFi
- CrumpS2
- ESP 12k NodeMCU
- Feather ESP32S2 without PSRAM
- FeatherS2
- FeatherS2 Neo
- FeatherS2 PreRelease
- Franzininho WIFI w/Wroom
- Franzininho WIFI w/Wrover
- Gravitech Cucumber M
- Gravitech Cucumber MS
- Gravitech Cucumber R
- Gravitech Cucumber RS
- HMI-DevKit-1.1
- Kaluga 1
- LILYGO TTGO T8 ESP32-S2 w/Display
- MORPHEANS MorphESP-240
- MicroDev microC3
- MicroDev microS2
- Oak Dev Tech PixelWing ESP32S2
- S2Mini
- S2Pico
- Saola 1 w/Wroom
- Saola 1 w/Wrover
- Targett Module Clip w/Wroom
- Targett Module Clip w/Wrover
- Thingz - Galaxia
- TinyS2
- nanoESP32-S2 w/Wrover
- nanoESP32-S2 w/Wroom
.. py:function:: ip_address(obj: Union[int, str]) -> IPv4Address
Return a corresponding IP address object or raise ValueError if not possible.
.. py:class:: IPv4Address(address: Union[int, str, bytes])
Encapsulates an IPv4 address.
Create a new IPv4Address object encapsulating the address value.
The value itself can either be bytes or a string formatted address.
.. py:attribute:: packed
:annotation: :bytes
The bytes that make up the address (read-only).
.. py:attribute:: version
:annotation: :int
4 for IPv4, 6 for IPv6
.. py:method:: __eq__(other: object) -> bool
Two Address objects are equal if their addresses and address types are equal.
.. py:method:: __hash__() -> int
Returns a hash for the IPv4Address data.