diff options
Diffstat (limited to 'example-gns.py')
-rwxr-xr-x | example-gns.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/example-gns.py b/example-gns.py new file mode 100755 index 0000000..4b3ea10 --- /dev/null +++ b/example-gns.py | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/usr/bin/python3 | ||
2 | |||
3 | import gnunet.gns | ||
4 | |||
5 | results = gnunet.gns.lookup("www.gnu", "JK55QA8JLAL64MBO8UM209KE93M9JBBO7M2UB8M3M03FKRFSUOMG", "A", True) | ||
6 | |||
7 | for r in results: | ||
8 | print("Got result from gns") | ||
9 | print(" record_type == %s" % repr(r.record_type)) | ||
10 | print(" data == %s" % repr(r.data)) | ||
11 | print(" expiration_time == %s" % repr(r.expiration_time)) | ||
12 | print(" private == %s" % repr(r.private)) | ||
13 | print(" pending == %s" % repr(r.pending)) | ||
14 | print(" shadow == %s" % repr(r.shadow)) | ||
15 | |||