Python module for Unbound provides easy-to-use flexible solution, for scripting query events and much more!
Along with extensible SWIG interface, it turns Unbound into dynamic DNS service designed for rapid development of DNS based applications, like detailed (per query/domain) statistics, monitoring with anything Python can offer (database backend, http server).