Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2819 Näkymät

Hi guys,

I have got the following context, i need to call a webapi from python method but i don't want to blocking UI until webapi responde the result.

I did with async/await but i don't get the result, can be that i am doing something bad, can anybody help me to solver it.


example:


async def fn(self):

    result = await callapi-************

    return result


def call_async_method(self):

    asyncio.run(self.fn())

    


Avatar
Hylkää
2023 looking for the same solution


Paras vastaus

Hi! im looking for the same solution... Can you resolve this?

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
lokak. 23
6015
0
toukok. 22
656
1
heinäk. 25
2334
2
heinäk. 25
7814
2
heinäk. 25
4212