Skip to main content

Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses

Project description

a library providing Pythonic manipulation, validation and classification of

common networking address notations, including :-

  • IPv4
  • IPv6
  • CIDR (Classless Inter-Domain Routing)
  • IEEE EUI-48, EUI-64 and MAC (Media Access Control)

Each object represents an individual address or address range and behaves as you would expect when treated like standard Python types. For example :-

If you call list() on a CIDR object, it provides an iterator yielding IP addresses.

Calling len() returns the number of addresses found within the range.

Indexing and/or slicing returns the addresses you’d expect. int() and hex() return the numerical value of an address in network byte order in the respective formats.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for netaddr, version 0.5.2
Filename, size File type Python version Upload date Hashes
Filename, size netaddr-0.5.2.tar.gz (158.7 kB) File type Source Python version None Upload date Hashes View hashes
Filename, size netaddr-0.5.2.win32.exe (84.1 kB) File type Windows Installer Python version 2.4 Upload date Hashes View hashes
Filename, size netaddr-0.5.2.zip (213.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page