# non blocking filters that make web api calls

**URL:** https://discourse.paraview.org/t/non-blocking-filters-that-make-web-api-calls/10702
**Category:** Development
**Created:** [November 9, 2022, 8:12am UTC](https://discourse.paraview.org/t/non-blocking-filters-that-make-web-api-calls/10702 "2022-11-09T08:12:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Saswata\_Chakravarty](https://discourse.paraview.org/user_avatar/discourse.paraview.org/saswata_chakravarty/32/10362_2.png) [@Saswata\_Chakravarty](https://discourse.paraview.org/u/Saswata_Chakravarty)
#### Post date: [November 9, 2022, 8:12am UTC](https://discourse.paraview.org/t/non-blocking-filters-that-make-web-api-calls/10702/1 "2022-11-09T08:12:58Z")

</div>

Hi Team

I am making a custom filter in python that makes multiple web api calls. Overall the results take some 5-15 minutes to complete.

Is there a way to make the functions in the filter non-blocking? I notice that when the filter executes, the paraview UI becomes unresponsive which is not a great user experience.

On a related note, i saw that the paraview python environment ships with the aiohttp library, which is what i am using to make the api calls. However i could not find any documentation about any existing event loops that we could plugin into in the filters, so i ended up wrapping the calls with asyncio.run, which is not ideal. Is there a way better way to do this?

Best regards  
Saswata
