Skip to main content

A command-line interface to query and explore IRR & BGP data from IRRexplorer.net

Project description

IRRexplorer CLI

Test (linter/formatter/coverage) Publish to PyPI codecov

A command-line interface to query and explore IRR & BGP data from IRRexplorer.net in real-time.

Overview

IRRexplorer CLI provides a simple way to access and analyze Internet Routing Registry (IRR) and BGP data through the command line. It interfaces with the IRRexplorer v2 service to help network operators and administrators debug routing data and verify filtering strategies.

Features

  • Query prefix information
  • Lookup ASN details
  • Real-time data access from IRRexplorer.net
  • Easy-to-use command-line interface
  • Async support for efficient data retrieval

Installation

pip install irrexplorer-cli

Links

Usage

Query Prefix (or IP) Information

irrexplorer prefix 200.160.4.153

Query ASN Information

irrexplorer asn AS22548

The following flags customize the output:

  • -f or --format: Specify output format

    • json: Output results in JSON format
    • csv: Output results in CSV format
    • Default format is human-readable text
  • -u or --url: Specify a custom base URL for the IRR Explorer API

irrexplorer --url https://custom-irrexplorer.example.com prefix 200.160.4.153
  • -d or --debug: Enable debug logging for troubleshooting
irrexplorer --debug prefix 200.160.4.153

Requirements

  • Python 3.13+
  • httpx
  • typer
  • rich

Development

  1. Clone the repository:
git clone https://github.com/kiraum/irrexplorer-cli.git
  1. Create/activate venv:
python3 -m venv venv
. venv/bin/activate
  1. Install dependencies:
pip install --upgrade uv
uv pip sync requirements.lock
  1. Run pre-commit tests before to push:
pre-commit run --all-files

Data Sources

The CLI tool queries data from IRRexplorer.net, which includes:

  • IRR objects and relations (route(6) and as-sets)
  • RPKI ROAs and validation status
  • BGP origins from DFZ
  • RIRstats

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

See LICENSE file for details.

Credits

This tool interfaces with IRRexplorer v2, a project maintained by Stichting NLNOG.

Project details


Download files

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

Source Distribution

irrexplorer_cli-0.0.4.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irrexplorer_cli-0.0.4-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file irrexplorer_cli-0.0.4.tar.gz.

File metadata

  • Download URL: irrexplorer_cli-0.0.4.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for irrexplorer_cli-0.0.4.tar.gz
Algorithm Hash digest
SHA256 40aba617ac0b132916ee3418045c23b873479d6934687b90869c4072881ad321
MD5 8d9a30d4642a9911b6fd1cfaf502722f
BLAKE2b-256 19cd13b6862e941b3e78f7f5742da0a27ad059560d59404ac10aac8d0f9bf397

See more details on using hashes here.

Provenance

The following attestation bundles were made for irrexplorer_cli-0.0.4.tar.gz:

Publisher: build_and_publish.yml on kiraum/irrexplorer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file irrexplorer_cli-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for irrexplorer_cli-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3b5d6dfa01b94d71d47bdfcf9651da4cd5833129a7db49694473066d9f3362c6
MD5 114c8c572984eebe174388c5139c390e
BLAKE2b-256 568f72a81aa05960638da37cad35eb6ac17c96bede466058a420a5b791814ff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for irrexplorer_cli-0.0.4-py3-none-any.whl:

Publisher: build_and_publish.yml on kiraum/irrexplorer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page