Python 2.4 or higher, SWIG 1.3 or higher, GNU make


You can download the source codes here. The latest release is 1.2.1, Mar 19, 2009. Previous release 1.1.1 can be dowloaded here.


After downloading, you can compile the Unbound library by doing:

> tar -xzf unbound-1.2.1-python.tar.gz
> cd unbound-1.2.1
> ./configure --with-pythonmodule
> make

You need GNU make to compile sources. SWIG and Python devel libraries to compile extension module.


If the compilation is successful, you can test the extension module by:

> cd pythonmod
> make sudo # or "make test" or "make suexec"

This will start unbound server with language dictionary service (see Tutorials). In order to test this service, type:

> dig TXT @

Dig should print this message (czech equivalent of aught):

; <<>> DiG 9.5.0-P2 <<>> TXT @
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30085
;; flags: aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;         IN      TXT

;; ANSWER SECTION:  300     IN      TXT     "nic"

;; Query time: 11 msec
;; WHEN: Thu Jan 10 16:45:58 2009
;; MSG SIZE  rcvd: 52

The pythonmod/examples directory contains simple applications written in Python.

Previous topic

Unbound scriptable interface

Next topic


Quick search