--- id: iptools version: "0.7.0" license: BSD license_treatment: permissive maintenance: abandoned --- # iptools — Python utilites for manipulating IPv4 and IPv6 addresses License: permissive · Maintenance: abandoned · Downloads: 237.2K/mo ## What it is and what it does iptools is a lightweight utility library for working with IP addresses in Python. It provides functions and objects to parse, validate, and test membership of IPv4 and IPv6 addresses, with special support for CIDR notation and arbitrary ranges. The package was originally designed to simplify Django's INTERNAL_IPS configuration by allowing developers to specify IP ranges using CIDR blocks instead of listing individual addresses. The core feature is the IpRangeList object, which implements Python's membership protocol (the `in` operator) to transparently handle mixed lists of single IPs, CIDR blocks, and start-end ranges. This makes it useful anywhere you need to check whether an IP falls within a set of allowed or blocked ranges. However, the package has been abandoned since 2019 and receives no maintenance, so it will not be updated for new Python versions or security issues. Use it for: - Configure Django's INTERNAL_IPS setting with CIDR blocks instead of individual IP addresses - Check whether a client IP is within a set of allowed or blocked network ranges in a web application - Parse and validate IPv4 and IPv6 addresses in network configuration or logging tools - Convert between IP address formats and numeric representations for network calculations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides utilities for parsing, validating, and manipulating IPv4 and IPv6 addresses, including CIDR notation and range operations. Yes, if you need basic IP address utilities and are working with Python versions up to 3.8. The package is stable and has no known vulnerabilities, but its abandonment means no future fixes. Suitable for legacy projects or simple use cases; for new projects requiring active maintenance, consider alternatives like ipaddress (built-in to Python 3.3+) or netaddr. ## Install pip install iptools uv add iptools poetry add iptools ## Installing iptools Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2019-01-07 and last commit 2020-01-22—so it will not receive bug fixes or security updates. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions, making it safe to incorporate into most projects. Quickstart: pip install iptools import iptools ranges = iptools.IpRangeList( '127.0.0.1', '192.168/16', ('10.0.0.1', '10.0.0.19') ) if '192.168.1.1' in ranges: print('IP is in range') Verify before relying: - Whether the package works correctly with modern Python versions beyond 3.8, given it was last updated in 2019 - Whether IPv6 handling is complete and correct for all edge cases - Performance characteristics when dealing with large numbers of IP ranges ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 237.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ipv4 ipv6 address utilities, cidr notation parsing, ip range validation, django internal ips, ip address manipulation, ip range membership testing, convert ip to long, networking, cidr, django [View on SkillFed](https://skillfed.io/packages/iptools) · [View on PyPI](https://pypi.org/project/iptools/)