Python package to help with remotebackend
Latest commit 945516f Nov 14, 2014 @cmouse Do not enforce python3.4
Failed to load latest commit information.
doc Added contributors Apr 16, 2014
src Moved logging to correct place Nov 14, 2014
tests Do not enforce python3.4 Nov 14, 2014
.gitignore Initial commit Aug 20, 2013
.travis.yml Travis fixes.. Sep 9, 2013
LICENSE Initial commit Aug 20, 2013
MANIFEST Updated MANIFEST Aug 21, 2013 Update Nov 13, 2014 Version bump Apr 16, 2014


This package is intended to help with remotebackend scripts.


To install, run

python build
python install


To use, import pdns.remotebackend, and subclass Handler. This code currently supports Pipe and Unix Connector, which you can use. This version also supports pipe backend, you can signify this by setting option 'abi' to pipe.


import pdns.remotebackend, pdns.remotebackend.unix
import sys
import io

class MyHandler(pdns.remotebackend.Handler):
    def do_lookup(self,args):
        if (args['qname'] == '' and args['qtype'] == 'ANY'):
            self.result = []
        if (args['qname'] == '' and (args['qtype'] == 'ANY' or args['qtype'] == 'SOA')):
            self.result = []
            self.result.append(self.record_prio_ttl('','SOA',' 2013073082 7200 3600 1209600 3600',0,300))

if __name__ == '__main__':
# or you can use
#   pdns.remotebackend.unix.UnixConnector(MyHandler).run()


The Handler class will call your class with do_<api function>. initialize becomes do_initialize. The function is passed a hash with all the keys provided. Please see for details on the API.

Connector constructor is

Connector(HandlerClass, options = {})

Supported options for all connectors is ttl, which defines default ttl to use if missing. For Unix Connector you can also specify path, which is path to the unix socket file to use.