summaryrefslogtreecommitdiff
path: root/contrib/ldnsx/README
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ldnsx/README')
-rw-r--r--contrib/ldnsx/README36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/ldnsx/README b/contrib/ldnsx/README
new file mode 100644
index 0000000..66f89d2
--- /dev/null
+++ b/contrib/ldnsx/README
@@ -0,0 +1,36 @@
+LDNSX: Easy DNS (including DNSSEC) via ldns.
+
+ldns is a great library. It is a powerfull tool for
+working with DNS. python-ldns it is a straight up clone of the C
+interface, howver that is not a very good interface for python. Its
+documentation is incomplete and some functions don't work as
+described. And some objects don't have a full python API.
+
+ldnsx aims to fix this. It wraps around the ldns python bindings,
+working around its limitations and providing a well-documented, more
+pythonistic interface.
+
+Written by Christopher Olah <chris@xelerance.com>
+
+Examples
+========
+
+Query the default resolver for google.com's A records. Print the response
+packet.
+
+>>> import ldnsx
+>>> resolver = ldnsx.resolver()
+>>> print resolver.query("google.com","A")
+
+Print the NS records for com. from f.root-servers.net if we get a
+response, else an error message.
+
+>>> import ldnsx
+>>> pkt = ldnsx.resolver("f.root-servers.net").query("com.","NS")
+>>> if pkt:
+>>> for rr in pkt.answer():
+>>> print rr
+>>> else:
+>>> print "response not received"
+
+