$npx skillfedfor your agent

pyasn

Offline IP address to Autonomous System Number lookup module.

With conditionsPyPI Python ModulesReleased Sep 202394.0K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — pyasn-1.6.2.tar.gz · builds from source
v1.6.2 · released 2023-09-01

Yes, if you need offline IP-to-ASN lookups and can tolerate high installation friction (C compiler required). The package is stable and has no known vulnerabilities, but maintenance is dormant—last release was over a year ago. Install only if bulk or historical lookups justify the upfront compilation cost over simpler online alternatives.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a C compiler and build tools (build-essential on Ubuntu/Debian, Microsoft Visual C++ on Windows); IPASN database file must be downloaded or built separately using pyasn_util_download.py and pyasn_util_convert.py.
  • Installation requires a C compiler and build tools (high friction); the package is dormant with the last release over a year ago, though the repository remains active with a recent commit in December 2024.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.

last release 2023-09-01 (1078 days) · last repo commit 2024-12-21 · 329 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 94,035 downloads/mo, #13,347 on PyPI

Verify before relying

pip install pyasn

import pyasn
asndb = pyasn.pyasn('ipasn_20140513.dat')
result = asndb.lookup('8.8.8.8')
print(result)  # (15169, '8.8.8.0/24')
  • Whether the package maintains compatibility with Python versions beyond 3.11 given dormant maintenance status.
  • Current state of gzip support for IPASN data files mentioned as 'new in v1.6' and any performance implications.
  • Availability and freshness of public IPASN data files for download via the provided utility scripts.
Same gist for agents: .md · .json

What it is and what it does

pyasn is a C-and-Python extension module that maps IP addresses to their originating Autonomous System Numbers using offline, precomputed databases. It uses a radix tree data structure to store and query IP prefixes efficiently, supporting both IPv4 and IPv6. Unlike online lookup services (whois, dig, JSON APIs), pyasn trades initial database load time for much faster per-lookup performance, making it suitable for bulk or repeated queries.

The package includes utility scripts to download BGP MRT/RIB archives and convert them into local IPASN database files, enabling historical lookups by date. Initial database loading is the most expensive operation; the documentation recommends caching loaded databases when performing multiple historical lookups. The module has no runtime dependencies and compiles on Linux and Windows, though Windows builds require Microsoft Visual C++.

Use it for

  • Bulk IP geolocation and routing analysis in network security or research without repeated online API calls.
  • Historical network routing analysis by loading IPASN databases from different dates to track AS ownership changes.
  • Building custom BGP prefix lookup tools by converting your own MRT archives into queryable databases.
  • Offline network traffic classification and AS-path analysis in environments without external API access.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need offline IP-to-ASN lookups and can tolerate high installation friction (C compiler required).

The package is stable and has no known vulnerabilities, but maintenance is dormant—last release was over a year ago. Install only if bulk or historical lookups justify the upfront compilation cost over simpler online alternatives.

Install

pyasn on PyPI

Before you install

Installation requires a C compiler and build tools (high friction); the package is dormant with the last release over a year ago, though the repository remains active with a recent commit in December 2024.

Requires a C compiler and build tools (build-essential on Ubuntu/Debian, Microsoft Visual C++ on Windows); IPASN database file must be downloaded or built separately using pyasn_util_download.py and pyasn_util_convert.py.

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include the license notice in distributions.

Quickstart

pip install pyasn

import pyasn
asndb = pyasn.pyasn('ipasn_20140513.dat')
result = asndb.lookup('8.8.8.8')
print(result)  # (15169, '8.8.8.0/24')

Verify before relying

  • Whether the package maintains compatibility with Python versions beyond 3.11 given dormant maintenance status.
  • Current state of gzip support for IPASN data files mentioned as 'new in v1.6' and any performance implications.
  • Availability and freshness of public IPASN data files for download via the provided utility scripts.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceDormant 1,078 days since the last release
Last repo commit
First released
Downloads94,035 / month, #13,347 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking

Evidence: pyasn-1.6.2.tar.gz

Tags

Capabilities
IP to ASN lookupoffline autonomous system numberBGP prefix lookupIP geolocation routinghistorical IP routing dataradix tree IP lookupASN database query
Topics
bgp-routingoffline-lookupnetwork-analysis
PyPI keywords
ipasnautonomoussystembgpwhoisprefixradixpythonroutingnetworking

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “IP to ASN lookup”

  • pyasnpyasn performs fast offline IP address to Autonomous System Number…
  • geoip2fastGeoIP2Fast performs fast geolocation lookups for IPv4 and IPv6…
  • pybgpkitPython bindings for BGPKIT tools that parse BGP data, query MRT…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also py-radix · geoip2fast · pybgpkit · peeringdb · whoisit · netutils · pybgpkit-parser · ipwhois · shodan · mac-vendor-lookup