answers = dns.resolver.query('google.com', 'SOA')
print('query qname:', answers.qname, ' num ans.', len(answers))
for rdata in answers:
    print(' serial: %s  tech: %s' % (rdata.serial, rdata.rname))
print(' refresh: %s  retry: %s' % (rdata.refresh, rdata.retry))
print(' expire: %s  minimum: %s' % (rdata.expire, rdata.minimum))
print(' mname: %s' % rdata.mname)
How do we get TXT, CNAME and SOA records from dnspython?