--- id: cidr-trie version: "3.1.2" license: MIT license_treatment: permissive maintenance: abandoned --- # cidr-trie — Store/search CIDR prefixes in a trie structure. License: permissive · Maintenance: abandoned · Downloads: 91.2K/mo ## What it is and what it does cidr-trie implements a Patricia trie (a space-efficient prefix tree) to store and query CIDR network blocks. You insert IP networks in CIDR notation along with arbitrary data, then query for all networks that contain a given IP address. It supports both IPv4 and IPv6 addresses and returns all matching prefixes from most specific to least specific. The package has no external runtime dependencies and installs cleanly. However, it has been abandoned since mid-2019 with no active maintenance, so it receives no bug fixes, security updates, or compatibility improvements for newer Python versions. It remains stable for its intended use case if your Python environment is compatible. Use it for: - Build a geolocation or ISP lookup table by storing CIDR blocks with associated metadata and querying IP addresses against it. - Implement IP-based access control lists by storing allowed or blocked CIDR ranges and checking incoming requests. - Organize network routing tables or firewall rules that need fast prefix matching on IP addresses. - Validate whether an IP address falls within a known set of CIDR ranges such as private networks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Stores and queries CIDR IP address blocks (IPv4 and IPv6) in a trie data structure for fast prefix matching and lookup. Yes, if you need CIDR prefix matching and your Python environment is compatible. The package is stable, has no dependencies, and works for its core use case. However, verify Python version compatibility first (requires_python is unspecified), and be aware that no maintenance or updates are forthcoming—use it only if the existing codebase meets your needs without modification. ## Install pip install cidr-trie uv add cidr-trie poetry add cidr-trie ## Installing cidr-trie Before you install: Low friction installation with no runtime dependencies. However, the package is abandoned—last release was 2019-07-05 and last commit 2022-12-08, so no active maintenance or bug fixes should be expected. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install cidr-trie from cidr_trie import PatriciaTrie trie = PatriciaTrie() trie.insert("0.0.0.0/0", "Internet") trie.insert("32.32.32.32/32", "example") result = trie.find_all("32.32.32.32") print([node.value for node in result]) Verify before relying: - Whether the package works correctly with modern Python versions (requires_python is unspecified in the fact sheet) - Performance characteristics for large CIDR datasets or production-scale deployments - Any known issues or edge cases in the abandoned codebase that may affect reliability ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 91.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags CIDR IP address lookup, IPv4 IPv6 trie storage, IP prefix matching, network address trie, CIDR range query, IP network search, patricia trie IP, ip-networking, data-structures [View on SkillFed](https://skillfed.io/packages/cidr-trie) · [View on PyPI](https://pypi.org/project/cidr-trie/)