Py-radix is an implementation of a radix tree for Python, which supports storage and lookups of IPv4 and IPv6 networks. This is a Python equivalent to Dave Plonka's Perl Net::Patricia (it even steals the same radix tree code from MRTd).
The radix tree (a.k.a Patricia tree) is the data structure most commonly used for routing table lookups. It efficiently stores network prefixes of varying lengths and allows fast lookups of containing networks. py-radix's implementation is built solely for networks (the data structure itself is more general).
This package contains the Python 2 version of the library.