I have an asyncio-based server application.
During development I can do live introspection and debugging using ipython:
ipython -i server.py -- [server args]
While during production, I do something like
python server.py --run-forever [server args]
(where --run-forever does asyncio.get_event_loop().run_forever() at the end of the server script)
It would be very nice if during production, I could still attach (remotely) a Jupyter console to that (or multiple consoles), using jupyter console --existing.
The trouble is, I can't see how to launch a proper ipykernel in the first place.
jupyter console server.py -- --run-forever [server args] does not work,
nor does ipython kernel -i server.py -- [server args].
Is this supported by either? Or do I need to write my own ipykernel.kernelapp subclass?
I have an asyncio-based server application. During development I can do live introspection and debugging using ipython:
While during production, I do something like
(where
--run-forever
doesasyncio.get_event_loop().run_forever()
at the end of the server script)It would be very nice if during production, I could still attach (remotely) a Jupyter console to that (or multiple consoles), using
jupyter console --existing
.The trouble is, I can't see how to launch a proper ipykernel in the first place.
jupyter console server.py -- --run-forever [server args]
does not work,nor does
ipython kernel -i server.py -- [server args]
.Is this supported by either? Or do I need to write my own ipykernel.kernelapp subclass?