pyasn is a Python module for offline IP address to Autonomous System Number (ASN) lookups. It uses a compact IP prefix trie and runs entirely offline once the data files are downloaded. Version 1.6.2 is current; releases are infrequent (last major update 2019).
pip install pyasnNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize with a downloaded IP-to-ASN database file and perform lookups.
Run 'pyasn_util_download.py --latest' to download the database, or point pyasn to a custom file.
Use 'import pyasn' and instantiate 'pyasn.pyasn()' instead of 'PyASN()'.
Ensure you have version >=1.0.0 and use 'import pyasn; asndb = pyasn.pyasn()'.
Download the database using 'pyasn_util_download.py --latest' or provide the correct path to an existing file.
No dependency data recorded yet.