Python client for the service
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This client still works, but relying on a 3rd party service has downsides for reliability and performance reasons. I've started a new project called asnlookup to allow one to perform lookups locally or to operate a similar service on their own infrastructure. If autonomy and 160,000 queries/second interests you, check it out.

Perform lookups by ip address and return ASN, Country Code, and Netblock Owner::

>>> import socket
>>> ip = socket.gethostbyname("")
>>> from cymruwhois import Client
>>> c=Client()
>>> r=c.lookup(ip)
>>> print r.asn
>>> print r.owner
GOOGLE - Google Inc.

See for full documentation.