albertz / background-zmq-ipython

Background ZMQ IPython/Jupyter kernel
BSD 2-Clause "Simplified" License
17 stars 4 forks source link
ipython jupyter python

Run some IPython ZMQ kernel in the background, without an interactive shell. You can connect to that kernel remotely via ZMQ.

Installation (package is on PyPI <https://pypi.org/project/background_zmq_ipython/>_)::

pip install background_zmq_ipython

Usage::

import background_zmq_ipython
background_zmq_ipython.init_ipython_kernel()

The kernel will then run in the background in its own thread. The init will print some message similar to this on stdout::

To connect another client to this IPython kernel, use:
jupyter console --existing kernel-1111.json

Now, after you connected, how to access globals from the main module? E.g. let's say there is a variable a.

Alternatives / related links: