python-subnettree | Python Module for CIDR Lookups | Mehr ...
The PySubnetTree package provides a Python data structure SubnetTree which maps subnets given in CIDR (Classless Inter-Domain Routing) notation to Python objects. Lookups are performed by longest-prefix matching.