full-artist-27215
10/25/2021, 5:28 PMred-match-15116
10/25/2021, 5:36 PMfull-artist-27215
10/25/2021, 5:48 PMasync def create(self, inputs):
let x = await make_an_http_request(...)
# do stuff with x
return CreateResult(...)
but I get RuntimeWarning: coroutine 'create' was never awaited
red-match-15116
10/26/2021, 4:05 AMcreate
function, because that function itself cannot be async
. So you’ll probably need to do something like:
def create(self, inputs):
x = asyncio.run(make_an_http_request(...))
return CreateResult(...)
if make_an_http_request
returns an Awaitablefull-artist-27215
10/26/2021, 3:49 PM