Nice work! Just to anyone looking to implement this, it looks like it needs the associated Blesta plugin installed to work.
Of course I discovered your work too late, after developing my own wrapper for python. It's pretty basic but also quite battle tested. You can feed in array args as a standard python dictionary and it outputs to the API in a format Blesta likes,
e.g.
{"vars": {"type": "cc", "account_id": "48"}, "client_id": 1}
becomes
[('vars[type]', 'cc'), ('client_id', 1), ('vars[account_id]', u'48')]
It does have one external dependency though (the wonderful requests module).