pygeon package

Classes

class pygeon.Geolocator(store)
lookup(addr)

Lookup the specified address and return the IPRange object identifying its country and the start of the range. The address may be either an IPy.IP object, or something that can be passed to the constructor of an IPy.IP object, for instance a string.

update()

Read the IP assignment data from AFRINIC, ARIN, APNIC, LACNIC and RIPE and store it in the store.

class pygeon.SQLAlchemyStore(ecu)

An IP range store based on SQLAlchemy. You can create this from an SQLAlchemy Engine or Connection object, or by specifying a connection string URL.

lookup(addr)

Given an address, locate it in the store and return an IPRange.

save(ranges)

Save the specified list of IPRanges to the SQLAlchemy store.

class pygeon.IPRange(start, country)