[MacPorts] #44587: New port: py-ipwhois

MacPorts noreply at macports.org
Thu Nov 6 16:28:01 PST 2014


#44587: New port: py-ipwhois
-------------------------------+--------------------------------
  Reporter:  jason-macports@…  |      Owner:  macports-tickets@…
      Type:  submission        |     Status:  new
  Priority:  Normal            |  Milestone:
 Component:  ports             |    Version:  2.3.1
Resolution:                    |   Keywords:  py-ipwhois
      Port:  py-ipwhois        |
-------------------------------+--------------------------------

Comment (by jason-macports@…):

 `IPWhois` is the object, `ipwhois` is the namespace, as in the description
 example, e.g.,
 {{{#!python
 $ python
 >>> import socket, ipwhois
 >>> fqdn = 'www.macports.org'
 >>> ip = socket.gethostbyname(fqdn)
 >>> ip
 '17.251.224.214'
 >>> w = ipwhois.IPWhois(ip)
 >>> w.lookup()
 {'asn': '714',
  'asn_cidr': '17.251.0.0/16',
  'asn_country_code': 'US',
  'asn_date': '',
  'asn_registry': 'arin',
  'nets': [{'abuse_emails': 'abuse at apple.com',
    'address': '20400 Stevens Creek Blvd., City Center Bldg 3',
    'cidr': '17.0.0.0/8',
    'city': 'Cupertino',
    'country': 'US',
    'created': '1990-04-16T00:00:00',
    'description': 'Apple Inc.',
    'handle': 'NET-17-0-0-0-1',
    'misc_emails': None,
    'name': 'APPLE-WWNET',
    'postal_code': '95014',
    'range': '17.0.0.0 - 17.255.255.255',
    'state': 'CA',
    'tech_emails': 'droot at apple.com',
    'updated': '2012-04-02T00:00:00'}],
  'query': '17.251.224.214',
  'raw': None,
  'raw_referral': None,
  'referral': None}
 }}}

 Works just fine for me: as above, so below.

-- 
Ticket URL: <https://trac.macports.org/ticket/44587#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list