Connecting to a Jupyter Server instance started remotely by Jupyter Hub via Python


I am trying to connect to a Jupyter Server instance in order to execute Python code on the IPykernel. The Jupyter Server instance I am trying to connect to is on a remote machine.

I noticed that I can connect to a local Jupyter instance using the connection_info and the jupyter_client Python package. Is it possible to do the same via remote server?

My goal is to build a different UI for a Jupyter Notebook. In my UI, when a user writes Python code, I want to forward it to the IPykernel, capture the result and display it in my new UI. Is this possible? Are there alternative approaches I should consider?

This is a good writeup of connecting to Jupyter servers running on JupyterHub using VSCode, which sounds similar to what you’re trying to do

Thanks a lot! Really appreciate the help