Webfaction-api-piston-wrapper is a project mainly written in Python, it's free.
webfaction api piston wrapper
See it in action (requires curl):
curl --verbose http://localhost:8000/webfaction/domain/ curl -d "domain=some-new-domain.com&subdomains=sub1&subdomains=sub2&subdomains=sub3" http://localhost:8000/webfaction/domain/ curl -X DELETE http://localhost:8000/webfaction/domain/some-new-domain.com
TODO -DomainHandler -delete should receive a optional list of subdomains -implement PUT method: add subdomains (change the main domain is not allowed)