All Projects → JustinAzoff → Python Cymruwhois

JustinAzoff / Python Cymruwhois

Licence: mit
Python client for the whois.cymru.com service

Programming Languages

python
139335 projects - #7 most used programming language

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("www.google.com")
>>> from cymruwhois import Client
>>> c=Client()
>>> r=c.lookup(ip)
>>> print r.asn
15169
>>> print r.owner
GOOGLE - Google Inc.

See http://packages.python.org/cymruwhois/ for full documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].