A pure Python network address representation and manipulation library.
netaddr provides a Pythonic way to work with :-
- IPv4 and IPv6 addresses and subnets (including CIDR notation)
- MAC (Media Access Control) addresses in multiple presentation formats
- IEEE EUI-64, OUI and IAB identifiers
- nmap-style IP address ranges
- a user friendly IP glob-style format
Included are routines for :-
- generating, sorting and summarizing IP addresses
- converting IP addresses and ranges between various different formats
- performing set based operations on groups of IP addresses and subnets
- arbitrary IP address range calculations and conversions
- querying IEEE OUI and IAB organisational information
- querying of IP standards related data from key IANA data sources
You can also take a look at the API documentation.
Current release is 0.7.3. Please feel free to take a look at this significant new release which breaks some backward compatibility with previous versions.
Tutorials for the library update are available here (for IP addresses) and here (for EUI/MAC addresses). This release also supports set based operations on IP addresses and subnets.
Maintenance release is 0.6.4. Please see the detailed CHANGELOG for latest changes and updates.
Enjoy!