- Notifications
You must be signed in to change notification settings - Fork550
a powerful DNS toolkit for python
License
rthalley/dnspython
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
dnspython is a DNS toolkit for Python. It supports almost all record types. Itcan be used for queries, zone transfers, and dynamic updates. It supportsTSIG-authenticated messages and EDNS0.
dnspython provides both high- and low-level access to DNS. The high-levelclasses perform queries for data of a given name, type, and class, and return ananswer set. The low-level classes allow direct manipulation of DNS zones,messages, names, and records.
To see a few of the waysdnspython can be used, look in theexamples/directory.
dnspython is a utility to work with DNS,/etc/hosts is thus not used. Forsimple forward DNS lookups, it's better to usesocket.getaddrinfo() orsocket.gethostbyname().
dnspython originated at Nominum where it was developed to facilitate thetesting of DNS software.
This is the development version ofdnspython 2.9.0.Please readWhat's New forinformation about the changes in this release.
- Many distributions have dnspython packaged for you, so you should check therefirst.
- To use a wheel downloaded from PyPi, run:
pip install dnspython- To install from the source code, go into the top-level of the source codeand run:
pip install --upgrade pip build python -m build pip install dist/*.whl- To install the latest from the main branch, run
pip install git+https://github.com/rthalley/dnspython.git
dnspython's default installation does not depend on any modules other thanthose in the Python standard library. To use some features, additional modulesmust be installed. For convenience,pip options are defined for therequirements.
If you want to use DNS-over-HTTPS, runpip install dnspython[doh].
If you want to use DNSSEC functionality, runpip install dnspython[dnssec].
If you want to use internationalized domain names (IDNA)functionality, you must runpip install dnspython[idna]
If you want to use the Trio asynchronous I/O package, runpip install dnspython[trio].
If you want to use WMI on Windows to determine the active DNS settingsinstead of the default registry scanning method, runpip install dnspython[wmi].
If you want to try the experimental DNS-over-QUIC code, runpip install dnspython[doq].
Note that you can install any combination of the above, e.g.:pip install dnspython[doh,dnssec,idna]
Python 2.x support ended with the release of 1.16.0.dnspython supports Python 3.10and later. Future support is aligned with the lifetime of the Python 3 versions.
Documentation has moved todnspython.readthedocs.io.
About
a powerful DNS toolkit for python
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.