--- id: nslookup version: "1.9.0" license: unclear license_treatment: copyleft maintenance: active --- # nslookup — Sensible high-level DNS lookups in Python, using DNSpython resolver License: copyleft · Maintenance: active · Downloads: 107.6K/mo ## What it is and what it does Nslookup is a lightweight wrapper around dnspython that simplifies DNS queries for the most common use cases: looking up A and AAAA records to resolve domain names to IP addresses, and SOA record queries. It abstracts away dnspython's lower-level API to provide straightforward functions that return parsed results and full response strings, with sensible error handling built in. The library is intentionally narrow in scope—it does not attempt to cover all DNS record types or edge cases, and features like DNS-over-HTTPS are explicitly out of scope. It defaults to UDP queries against system DNS servers but supports custom DNS servers and TCP mode, though the documentation notes that TCP mode creates a new session per query and is resource-intensive for bulk operations. Use it for: - Resolve domain names to IP addresses in a Python application without wrestling with dnspython's full API - Perform SOA record lookups to check domain authority or delegation details - Query against a specific DNS server (e.g., 1.1.1.1) instead of relying on system defaults - Add DNS resolution to a simple script or tool with minimal dependencies and setup ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides high-level DNS lookups (A, AAAA, and SOA records) with clean error handling, wrapping dnspython's resolver for common query patterns. Yes, if you need straightforward DNS lookups for A, AAAA, or SOA records. The single dependency, active maintenance, and low install friction make it a sensible choice for common queries. Skip it if you need advanced DNS features (other record types, DoH, complex error recovery) or bulk TCP queries—use dnspython directly instead. ## Install pip install nslookup uv add nslookup poetry add nslookup ## Installing nslookup Before you install: Low friction install with a single runtime dependency (dnspython). Actively maintained with recent commits; repository is not archived. License in practice: Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license requiring derivative works to disclose modifications under the same license terms. Quickstart: pip install nslookup from nslookup import Nslookup dns_query = Nslookup() ips_record = dns_query.dns_lookup("example.com") print(ips_record.answer) Verify before relying: - Whether the library handles DNS timeouts, retries, or connection failures beyond basic exception handling - Performance characteristics when querying many domains in sequence - Whether custom DNS server configuration works reliably across different network environments ## Package facts - License: not declared (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 107.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dns lookup python, dns query library, resolve domain name, get ip address dns, dns a record lookup, soa record query, simple dns resolver, dns-resolution, network-utilities [View on SkillFed](https://skillfed.io/packages/nslookup) · [View on PyPI](https://pypi.org/project/nslookup/)