Reputation: 16365
We have a web app that allows users to interactively discover web service data URLs. We would like to allow a discovered service URL to be sent to an Ipython Notebook, where data from the service could be extracted, analyzed and visualized in the notebook. Is that possible?
Upvotes: 3
Views: 1854
Reputation: 1357
This topic : Connecting to a remote IPython instance
will show you how to execute python code from an app/script and return any "python objects" back to the notebook kernel.
Essentially what i will do in this case is to execute python code from the web app using the approach described before, note that for recent version of IPython (i use 3.0-dev) you should change :
from IPython.zmq.blockingkernelmanager import BlockingKernelManager
to :
from IPython.kernel import BlockingKernelClient
If your web-app can receive parameters in the url, you can construct the url+query from the notebook giving the connection info as one of the input parameters. You can retrieve the connection ifo within the notebook using:
%connect_info
Upvotes: 3