summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-05-16 19:26:37 -0700
committerBob Halley <halley@dnspython.org>2020-05-16 19:26:37 -0700
commit7f197681162b420c8b3fd5b5339628378cf80d62 (patch)
treeda360eca36263ab95aadfbda7a607feee508a9e1 /examples
parent6f3803a27dd74b0447795434682da8276a47ace0 (diff)
downloaddnspython-7f197681162b420c8b3fd5b5339628378cf80d62.tar.gz
async resolver and linting
Diffstat (limited to 'examples')
-rw-r--r--examples/trio.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/trio.py b/examples/trio.py
index 5bf889c..bed8c0d 100644
--- a/examples/trio.py
+++ b/examples/trio.py
@@ -19,6 +19,10 @@ async def main():
q = dns.message.make_query(host, 'A')
r = await dns.trio.query.stream(q, '8.8.8.8', tls=True)
print(r)
+ a = await dns.trio.resolver.resolve(host, 'A')
+ print(a.response)
+ zn = await dns.trio.resolver.zone_for_name(host)
+ print(zn)
if __name__ == '__main__':
trio.run(main)