Question: How can I convert many IP ranges into a CIDR notation?
All I found is the [ip2cidr service](http://ip2cidr.com/bulk-ip-to-cidr-converter.php), but I have >200K IP-records.

Answer: 
<http://pypi.python.org/pypi?%3Aaction=search&term=cidr&submit=search>
Using netaddr:

```
from netaddr import *
ips = ['192.168.37.111', '192.168.37.112']
all_ips = list(iter_iprange(ips[0], ips[1]))
ip_address = cidr_merge(all_ips)
cidr = []
for ip in ip_address:
    cidr.append(str(ip.cidr))

```