The main start
function of the Server class is async and there is plenty of asyncio enabled code in the streamlit codebase. The scripts are run over exec and through that (?) the event loop is made unavailable for the client code and using asyncio code becomes impossible.
So therefore two questions:
- is there a possibility to import the client script instead of
exec
it (streamlit/runtime/scriptrunner/script_runner.py:535) - how to get the tornado’s event loop and use it for the client code?