Skip to main content

A python class to quickly search ip2asn data for range matches

Project description


A python class to search ip2asn information for matches.


Using pip:

pip3 install ip2asn

Or manually:

git clone
cd ip2asn
python3 build
python3 install

Example Usage


curl -o ip2asn-v4-u32.tsv.gz
gunzip ip2asn-v4-u32.tsv.gz


import ip2asn
i2a = ip2asn.IP2ASN("ip2asn-v4-u32.tsv")
result = i2a.lookup_address("")

import pprint


{'ASN': '15133',
 'country': 'US',
 'ip_numeric': 1572395042,
 'ip_range': [1572394752, 1572396543],
 'ip_text': '',
 'owner': 'EDGECAST - MCI Communications Services, Inc. d/b/a Verizon Business'}


Wes Hardaker, USC/ISI

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ip2asn, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size ip2asn-1.0-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ip2asn-1.0.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page