I am fighting with tornado and the official python oauth2client, gcloud... modules.
These modules accept an alternate http client passed with http=, as long as it has a method called
self.client = AsyncHttpClient()
These libraries do not support asynchronous. The porting process is not always easy.
Since I am not aware of any Tornado/asyncio implementation of
gcloud-python, so you could:
you may write it yourself. Again it's not simple transport change of
request, all the stuff around must be able to use/yield future/coroutines.
wrap it in
ThreadPoolExecutor (as @Apero mentioned). This is high level API, so any nested api calls within that yield will be executed in same thread (not using the pool). It could work well.
external app (with
When I had similar problem with AWS couple years ago, I've ended up with executing, asynchronously, CLI (Tornado + subprocess.Popen + some cli (awscli, or boto based)) and simple cases (like S3, basic EC2 operations) with plain AsyncHTTPClient.