py3dns
Python 3 DNS library
Decision gist · record as of 2026-08-14
Yes, if you need lightweight synchronous DNS queries and can accept dormant maintenance. The package is stable, has no dependencies, and works reliably for basic DNS lookups in Python >=3.2. No, if you require async DNS, active maintenance, or clarity on licensing terms before deployment. The unclear license treatment warrants verification before use in proprietary contexts.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.2; async DNS queries are not supported (removed in version 4.0.0).
- Low install friction with no runtime dependencies.
- Dormant maintenance status (799 days since last release) means no active development, though the package remains functional for its stated purpose.
License · maintenance · safety
(unclear) — License treatment is unclear—no SPDX identifier or explicit raw license text is available in the metadata, despite classifiers indicating Python License (CNRI Python License). Verify the actual license terms before use in proprietary or restricted contexts.
last release 2024-06-06 (799 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 128,033 downloads/mo, #11,722 on PyPI
Alternatives
Verify before relying
pip install py3dns
import DNS
req = DNS.Request()
result = req.req('example.com', qtype='A')- Whether the Python License (CNRI Python License) is compatible with your project's licensing requirements.
- Current stability and compatibility with Python versions beyond 3.2, given dormant maintenance status.
- Whether the package handles edge cases in modern DNS environments or has known limitations with certain record types.
What it is and what it does
py3dns is a Python 3 port of the original pydns library, providing a straightforward interface for making DNS queries. It handles nameserver discovery from system configuration, supports multiple nameservers with fallback, and returns results in useful formats—including ipaddress objects for A and AAAA queries by default. The package includes convenience functions for reverse DNS and MX record queries.
The library is synchronous only; async DNS support was removed in version 4.0.0. With no runtime dependencies and low install friction, py3dns is a minimal, self-contained option for basic DNS lookups in Python 3 applications, though its dormant maintenance status means no active development or bug fixes.
Use it for
- Perform reverse DNS lookups to resolve IP addresses to hostnames in network monitoring or logging.
- Query MX records to validate email domain configurations or build mail server lists.
- Look up A/AAAA records to resolve domain names to IP addresses in custom DNS clients or network tools.
- Retrieve SOA records to check zone authority and serial numbers for DNS administration tasks.
- Build DNS query utilities or diagnostic tools that need synchronous, lightweight DNS resolution.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight synchronous DNS queries and can accept dormant maintenance.
The package is stable, has no dependencies, and works reliably for basic DNS lookups in Python >=3.2. No, if you require async DNS, active maintenance, or clarity on licensing terms before deployment. The unclear license treatment warrants verification before use in proprietary contexts.
Install
py3dns on PyPI
Before you install
Low install friction with no runtime dependencies. Dormant maintenance status (799 days since last release) means no active development, though the package remains functional for its stated purpose.
Requires Python >=3.2; async DNS queries are not supported (removed in version 4.0.0).
License in practice
License treatment is unclear—no SPDX identifier or explicit raw license text is available in the metadata, despite classifiers indicating Python License (CNRI Python License). Verify the actual license terms before use in proprietary or restricted contexts.
Quickstart
pip install py3dns
import DNS
req = DNS.Request()
result = req.req('example.com', qtype='A')
Verify before relying
- Whether the Python License (CNRI Python License) is compatible with your project's licensing requirements.
- Current stability and compatibility with Python versions beyond 3.2, given dormant maintenance status.
- Whether the package handles edge cases in modern DNS environments or has known limitations with certain record types.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.2 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 799 days since the last release |
| First released | |
| Downloads | 128,033 / month, #11,722 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: No Input/Output (Daemon)Intended Audience :: DevelopersLicense :: OSI Approved :: Python License (CNRI Python License)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Internet :: Name Service (DNS)Topic :: Software Development :: Libraries :: Python Modules |
Evidence: py3dns-4.0.2-py3-none-any.whl
Tags
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 › “DNS queries python”
- py3dnsProvides synchronous DNS query functionality for Python 3, supporting…
- dnspythondnspython is a DNS toolkit that handles queries, zone transfers,…
- pycarespycares provides a Python interface to c-ares, a C library for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
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.
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
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…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also aiodns · nslookup · dnslib · pycares · dnspython · ipaddress · azure-mgmt-dns · zeroconf · dns-lexicon · aiodiscover