skillfed

netaddr

A network address manipulation library for Python

netaddr v1.3.0 14.0M downloads/30d#1,256 on PyPI827
Permissive license BSD License DORMANT released

What it is and what it does

netaddr is a pure-Python library for parsing, representing, and manipulating network addresses at Layer 2 and Layer 3. It handles IPv4 and IPv6 addresses, subnets, and masks; MAC and EUI-64 identifiers; and provides utilities like CIDR parsing, IANA block lookups, and DNS reverse-lookup generation. The library has no runtime dependencies and installs cleanly on Python 3.7 and later.

Typical use is in network automation, infrastructure tooling, and systems administration where you need to work with IP ranges, validate addresses, perform subnet calculations, or look up organizational information tied to IP blocks or MAC vendors. It supports set-based operations (unions, intersections) over address ranges and can parse multiple formats including CIDR, arbitrary ranges, and nmap notation.

Use it for:

  • Validate and parse user-supplied IP addresses or CIDR blocks in network configuration tools.
  • Iterate over all hosts in a subnet or check membership of an IP in a range.
  • Perform supernetting or subnetting calculations for network planning.
  • Look up IANA IP block ownership or IEEE OUI/IAB information for network diagnostics.
  • Generate DNS reverse-lookup zones from IP ranges in DNS management scripts.

Worth the install?

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

Represents and manipulates IPv4, IPv6, MAC addresses and related network objects; supports CIDR notation, subnetting, set operations, IANA lookups, and DNS reverse generation.

Yes. netaddr is a stable, dependency-free library for a well-defined problem (network address manipulation) with no known vulnerabilities. Its dormant maintenance is not a blocker for stable use cases; the API is mature and the task domain is not rapidly evolving. Install if you need to work with IP addresses, subnets, or MAC addresses in Python.

Install

netaddr on PyPI

pip

pip install netaddr

uv

uv add netaddr

poetry

poetry add netaddr

Installing netaddr

Before you install

Low friction install with no runtime dependencies. Dormant maintenance (last commit 2024-07-05, 808 days since release) but marked Production/Stable; suitable for stable, well-defined network tasks rather than rapidly evolving features.

License in practice

BSD License (permissive); you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install netaddr

from netaddr import IPNetwork, IPAddress
net = IPNetwork('10.0.0.0/8')
for ip in net:
    print(ip)

Requires Python 3.7 or later.

Verify before relying

  • Whether the 808-day gap since last release reflects intentional stability or abandonment risk for future Python versions.
  • Performance characteristics for large-scale IP range operations or set operations on many subnets.
  • Real-world usage patterns and whether the library remains actively maintained despite dormant status.

Package facts

License BSD License (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 808 days since the last release
Last repo commit
First released
Downloads 13,958,594/month — #1,256 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: netaddr-1.3.0-py3-none-any.whl

Keywords: Networking, Systems Administration, IANA, IEEE, CIDR, IP, IPv4, IPv6, CIDR, EUI, MAC, MAC-48, EUI-48, EUI-64

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: CommunicationsTopic :: DocumentationTopic :: EducationTopic :: Education :: TestingTopic :: Home AutomationTopic :: InternetTopic :: Internet :: Log AnalysisTopic :: Internet :: Name Service (DNS)Topic :: Internet :: Proxy ServersTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Internet :: WWW/HTTP :: Site ManagementTopic :: SecurityTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: Traffic GenerationTopic :: System :: BenchmarkTopic :: System :: ClusteringTopic :: System :: Distributed ComputingTopic :: System :: Installation/SetupTopic :: System :: LoggingTopic :: System :: MonitoringTopic :: System :: NetworkingTopic :: System :: Networking :: FirewallsTopic :: System :: Networking :: MonitoringTopic :: System :: Networking :: Time SynchronizationTopic :: System :: Recovery ToolsTopic :: System :: ShellsTopic :: System :: Software DistributionTopic :: System :: System ShellsTopic :: System :: Systems AdministrationTopic :: Text ProcessingTopic :: Text Processing :: FiltersTopic :: Utilities

Tags

IP address parsing and manipulationIPv4 IPv6 subnet CIDRnetwork address libraryMAC address handlingIP range operations
network-addressingip-utilities

More Software Development packages