skillfed

macaddress

Like ``ipaddress``, but for hardware identifiers such as MAC addresses.

macaddress v2.0.2 189.9K downloads/30d#9,920 on PyPI21
Permissive license 0BSD Abandoned released

What it is and what it does

macaddress is a lightweight library for working with hardware identifiers like MAC addresses, inspired by Python's built-in ipaddress module. It provides classes for common types (EUI48/MAC, EUI64, OUI) and allows you to parse these identifiers from multiple string formats (colon-separated, dash-separated, dot-separated, or raw hex), convert them to and from bytes or integers, and perform equality and ordering comparisons. You can also define custom hardware address types by subclassing the base HWAddress class.

The library has no runtime dependencies and installs cleanly. However, it has been abandoned since its latest release on 2022-11-04 with no commits or updates since 2023-05-26, so it receives no active maintenance. It is marked as Production/Stable in its classifiers, making it suitable for stable, self-contained use cases where you do not expect ongoing support.

Use it for:

  • Validate and normalize MAC addresses from user input or network device data before storing or processing.
  • Convert MAC addresses between common string formats (colon, dash, dot, hex) for compatibility with different tools or protocols.
  • Extract the OUI (Organizationally Unique Identifier) from a MAC address to identify the hardware manufacturer.
  • Parse and compare hardware identifiers in network monitoring, device inventory, or DHCP/ARP tools.
  • Define custom hardware address types (e.g., InfiniBand, CDI) for specialized networking or embedded systems work.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses, validates, and converts MAC addresses and other hardware identifiers (EUI-48, EUI-64, OUI, etc.) between string, binary, and integer forms.

Yes, if you need straightforward MAC address parsing and conversion in a stable, dependency-free package. The library is production-ready for its core use case and carries no security vulnerabilities. However, be aware that it is abandoned and will not receive updates or bug fixes; only install if you are comfortable maintaining a fork or accepting the risk of unpatched issues on newer Python versions.

Install

macaddress on PyPI

pip

pip install macaddress

uv

uv add macaddress

poetry

poetry add macaddress

Installing macaddress

Before you install

Low friction install with no runtime dependencies. Last release was 1379 days ago and the repository is marked abandoned, so expect no active maintenance or bug fixes going forward.

License in practice

Licensed under 0BSD (permissive), so you can use, modify, and distribute freely with minimal restrictions.

Quickstart

pip install macaddress

import macaddress

mac = macaddress.EUI48('01-23-45-67-89-ab')
print(mac)  # EUI48('01-23-45-67-89-AB')
print(bytes(mac))
print(int(mac))

Verify before relying

  • Whether the abandoned status and 1379-day gap since last release poses risk for undiscovered bugs or compatibility issues with newer Python versions.
  • Whether the library's feature set (EUI-48, EUI-64, OUI, CDI32, etc.) covers all hardware identifier types needed for your use case.
  • Actual monthly download volume and real-world adoption patterns beyond the top-15000 tier classification.

Package facts

License 0BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,379 days since the last release
Last repo commit
First released
Downloads 189,877/month — #9,920 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: macaddress-2.0.2-py3-none-any.whl

Development Status :: 5 - Production/StableOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

MAC address parsinghardware identifier validationEUI-48 EUI-64 OUIMAC address conversionnetwork hardware addressbinary MAC address formatMAC address validation
network-utilitieshardware-identifiers

More Networking packages