SkillAgentSearch skills...

Domain2ip

Resolve domains, URLs, and IP literals to IPv4/IPv6 addresses with a production-ready CLI and library-safe API. Supports IDNs, URL inputs, concurrent lookups, JSON output, optional dnspython timeouts, and file/bulk mode—ideal for network tooling, automation, and reproducible tests.

Install / Use

/learn @SagarBiswas-MultiHAT/Domain2ip
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Domain to IP Converter

<div align="right">

CI   Python Versions   License

</div>

Resolve domains, URLs, and IP literals into IPv4/IPv6 addresses with a fast, library-safe API and a production-ready CLI.

Overview

  • Accepts hostnames, IPv4, IPv6, IDNs (punycode), and http/https URLs.
  • Uses dnspython (A + AAAA) when available with real timeout support.
  • Falls back to socket.getaddrinfo when dnspython is unavailable.
  • Clean CLI with JSON output, concurrency, and quiet/no-color controls.

Installation

Install from source:

pip install .

Optional DNS dependency (recommended for timeouts):

pip install .[dns]

Development tooling:

pip install .[dev]

CLI Examples

Resolve a domain:

ip-converter example.com

Resolve a URL and emit JSON:

ip-converter https://user:pass@example.com/path --json

Resolve many domains with concurrency and a custom timeout:

ip-converter example.com example.org --timeout 2.5 --concurrency 8

Read from a file:

ip-converter --file domains.txt

Library Usage

from domain_ip_converter import normalize_domain, resolve_host

host = normalize_domain("https://пример.рф/path")
result = resolve_host(host, timeout=2.0)
print(result.ipv4, result.ipv6)

Optional Dependencies

  • dnspython (extra: dns) enables reliable DNS timeouts and record querying.

Testing

pytest

Run with coverage:

pytest --cov=domain_ip_converter --cov-report=term-missing

License

MIT License. See LICENSE.

View on GitHub
GitHub Stars18
CategoryCustomer
Updated24d ago
Forks0

Languages

Python

Security Score

95/100

Audited on Mar 16, 2026

No findings