[getdns-api] Python bindings plans

Melinda Shore melinda.shore at nomountain.net
Wed Jun 25 04:21:35 CEST 2014


Hi, folks:

I'm reworking the Python bindings with an eye towards an initial
release in about three weeks.  This code will be the basis
for the mature release.  There will be a fairly fundamental
reworking of the interfaces, but we'll be keeping the current
interface available through one or two releases to give people
a chance to transition.

The two major changes are intended to make the interfaces
more Pythonic.  They are:

1) the introduction of a new Context object, with queries
   being methods associated with that object (note that this
   is consistent with the design of the Node.js bindings)
2) context attributes are going to be treated as Python
   attributes, so that rather than (for example) using

      c = getdns.context_create()
      getdns.context_set_resolution_type(c,
getdns.GETDNS_RESOLUTION_RECURSING)

   you'd use

      c = getdns.Context()
      c.resolution_type = getdns.GETDNS_RESOLUTION_RECURSING

Basically, the setters and the getter are going away.  The results
dict is going to stay the same but over time we may be adding
some convenience methods for access.

While I don't love having async support in the bindings, that
will be included as well.

Comments and suggestions are very welcome.

Thanks,

Melinda


-- 
Melinda Shore
No Mountain Software
melinda.shore at nomountain.net

"Software longa, hardware brevis."
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org



More information about the spec mailing list