How do I convert a list of IP addresses to a list of CIDRs? Google\'s ipaddr-py library has a method called summarize_address_range(first, last) that converts two IP addres
You can do it in one line using netaddr:
cidrs = netaddr.iprange_to_cidrs(ip_start, ip_end)