For non-authorative local DNS caches:
twistd dns --recursive --cache
twistd dns --bindzone ZONEFILE
twisted.names (that's the name of the DNS package) is simple enough to use for DNS serving (demonstrated above) and flexible enough to get it to do pretty much whatever you want.
For non-authorative local DNS caches:
For authorative servers, to serve a BIND-style zonefile: But, of course, that's pretty boring. The fun stuff is when you have a Python source file as your zonefile! See: https://twistedmatrix.com/documents/current/names/howto/name...twisted.names (that's the name of the DNS package) is simple enough to use for DNS serving (demonstrated above) and flexible enough to get it to do pretty much whatever you want.