Package: py3dns
Release 4.0.0 Sat, Jul 1, 2023Removed class DnsAsyncRequest since Python 3.12 dropped asyncore.  Bumpingmajor version since this is a breaking change.  If you need async DNS, useaiodns instead.Changed behavior when /etc/resolv.conf is missing.  Instead ofFileNotFoundError, assume DNS server is '127.0.0.1'.Release 3.2.0 Mon Jul 23 2018Switched from distutils to setuptools because "it's the future".  It isunlikely to have end user impact.  For python3.3+ no additional dependenciesare required.Release 3.1.0 Thu Apr 24 23:52:00 EDT 2014More choices about result types are provided in 3.1.0.  To specify resulttype,in a DnsRequest object, use the new function DnsRequest.qry(resulttype='binary/text/default'). DnsRequest.qry returns ipaddress objectsfor A and AAAA queries by defaults.  Other defaults are the same asDnsRequest.req.  Continue to use DnsRequest.req for exact backwardcompatibility with pydns and older py3dns defaults.  TXT and SPF record dataare returned as strings by default, this matches what dnspython3 returns.The ipaddress module is used internally now.  See CHANGES for details.Release 3.0.3 Wed May 29 00:05:00 EDT 2013There was a third, unintended incompatiblity in 3.0.2 in that IPv6 addresseswere returned in their string format rather than their decimal format.  Thisbreaks pyspf queries when the connect IP is IPv6.  3.0.3 is a release strictlyto revert this change.Release 3.0.2 Thu Jan 19 01:25:00 EST 2012This release introduces two potentially incompatible changes from the pythonverion of DNS (pydns).  First, the data portion of DNS records of types TXTand SPF are returned as bytes instead of strings.  Second, additional subclasses of DNSError have been added.  Any code that catches DNSError shouldbe checked to see if it needs updating to catch one of the new sub classes:ArgumentError, SocketError, TimeoutError, ServerError, andIncompleteReplyError.Release 3.0 Sun Mar 2-9 23:07:22 2011 -0400Ported to Python3 by Scott Kitterman <scott@kitterman.com>.  This is mostly aminimal port to work with Python3 (tested with python3.2) plus addition ofsome of the patches that people have submitted on Sourceforge. It should befully API compatible with 2.3. Note: Version 3.0.0 shipped with a newlazy.lookupfull function in advance of 2.3. This was incorporated in pydns2.3.5 as lazy.lookupalll. It has been renamed in 3.0.1 to stay API compatiblewith pydns 2.3.Release 2.3 Mon May  6 16:18:02 EST 2002This is a another release of the pydns code, as originally written byGuido van Rossum, and with a hopefully nicer API bolted over thetop of it by Anthony Baxter <anthony@interlink.com.au>.This code is released under a Python-style license.I'm making this release because there hasn't been a release in aheck of a long time, and it probably deserves one. I'd also like todo a substantial refactor of some of the guts of the code, and thisis likely to break any code that uses the existing interface. Sothis will be a release for people who are using the existing API...There are several known bugs/unfinished bits- processing of AXFR results is not done yet.- doesn't do IPv6 DNS requests (type AAAA)- docs, aside from this file- all sorts of other stuff that I've probably forgotten.- MacOS support for discovering nameservers- the API that I evolved some time ago is pretty ugly. I'm goingto re-do it, designed this time.Stuff it _does_ do:- processes /etc/resolv.conf - at least as far as nameserver directives go.- tries multiple nameservers.- nicer API - see below.- returns results in more useful format.- optional timing of requests.- default 'show' behaviour emulates 'dig' pretty closely.To use:import DNSreqobj=DNS.Request(args)reqobj.req(args)args can be a name, in which case it takes that as the query, and/or a seriesof keyword/value args. (see below for a list of args)when calling the 'req()' method, it reuses the options specified in theDNS.Request() call as defaults.options are applied in the following order:those specified in the req() callor, if not specified there,those specified in the creation of the Request() objector, if not specified there,those specified in the DNS.defaults dictionaryname servers can be specified in the following ways:- by calling DNS.DiscoverNameServers(), which will load the DNS serversfrom the system's /etc/resolv.conf file on Unix, or from the Registryon windows.- by specifying it as an option to the request- by manually setting DNS.defaults['server'] to a list of server IPaddresses to try- XXXX It should be possible to load the DNS servers on a mac os machine,from where-ever they've squirrelled them awayname="host.do.main"   # the object being looked upqtype="SOA"           # the query type, eg SOA, A, MX, CNAME, ANYprotocol="udp"        # "udp" or "tcp" - usually you want "udp"server="nameserver"   # the name of the nameserver. Note that you might# want to use an IP address hererd=1                  # "recursion desired" - defaults to 1.other: opcode, port, ...There's also some convenience functions, for the lazy:to do a reverse lookup:>>> print DNS.revlookup("192.189.54.17")yarrina.connect.com.auto look up all MX records for an entry:>>> print DNS.mxlookup("connect.com.au")[(10, 'yarrina.connect.com.au'), (100, 'warrane.connect.com.au')]Documentation of the rest of the interface will have to wait for alater date. Note that the DnsAsyncRequest stuff is currently notworking - I haven't looked too closely at why, yet.There's some examples in the tests/ directory - including test5.py,which is even vaguely useful. It looks for the SOA for a domain, checksthat the primary NS is authoritative, then checks the nameserversthat it believes are NSs for the domain and checks that they'reauthoritative, and that the zone serial numbers match.see also README.guido for the original docs.py3dns is derived from pydns.  The sourceforge details below refer to pydns.All py3dns issues/comments/etc should be reported viahttps://launchpad.net/py3dns.comments to me, anthony@interlink.com.au, or to the mailing list,pydns-developer@lists.sourceforge.net.bugs/patches to the tracker on SF -http://sourceforge.net/tracker/?group_id=31674