Both SSH (CLI) and iControl API should be supported.
Python iControl library
Code samples (requires login):
iControl white paper:
In case PyControl won't adapt because the underlying library (Suds) is not asynchronous, consider Twisted-Suds (which may need to be adapted for later Suds 0.3.9):
Add SSH CLI support for F5 BIGIP load balancers