Skip to main content

naddrtools

naddrtools is a simple library for manipulating IP addresses, ranges, and networks and acts as an extension of the netaddr module.

>>> import naddrtools as nat
>>> mylist = ["100.25.13.11", "172.20.31.0/24", "172.20.30.1 - 172.20.30.254"]
>>> ipset = nat.build_ipset(mylist, buff_network_ranges=True)
>>> print(ipset)
IPSet(['100.25.13.11/32', '172.20.30.0/23'])
>>> print(nat.convert_ipset_to_ranges_as_string(ipset))
100.25.13.11, 172.20.30.0 - 172.20.31.255

Installing naddrtools

naddrtools is available on PyPI:

$ python -m pip install naddrtools

Release files for naddrtools 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for naddrtools 0.1.2
File Size Uploaded
naddrtools-0.1.2.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for naddrtools 0.1.2
File Interpreter ABI Platform
naddrtools-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / naddrtools-0.1.2.tar.gz

Download URL naddrtools-0.1.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c947b3a55262e8c85c5417b9c288fa02bd72e3ba662ed1c81376110da7312f69
BLAKE2b-256 checksum
How to use checksums
fdee5aa32b0f50f8bc86bcec351ba0a40425005e386f3878184bdad8b3ff0560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

Release files / naddrtools-0.1.2-py3-none-any.whl

Download URL naddrtools-0.1.2-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08414773be1c07c70aef6d668347889f219dc30716a91cc3b3a5c66e944d45c3
BLAKE2b-256 checksum
How to use checksums
458019ce0a32989e2fdb0a5405e7f7b3090bf1f8e68792a706af08e1740b3731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page