How to get tornado's event loop within the script

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?
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.