Jupyter Remote Runner
A CLI interface to a persistent Jupyter kernel for code execution with timeout handling and streaming output.
Installation
Install using pipx (recommended):
pipx install .
Or using pip:
pip install .
Usage
Commands
jupyter-remote-runner --help- Show helpjupyter-remote-runner start- Start the Jupyter kernel daemonjupyter-remote-runner stop- Stop the daemonjupyter-remote-runner status- Check daemon statusjupyter-remote-runner run <code>- Execute code in the persistent kernel
Run Command Options
--timeout <seconds>- Set execution timeout (default: 60)--is-input- Send code as input to Python input() prompt
Examples
# Start the daemon
jupyter-remote-runner start
# Execute Python code
jupyter-remote-runner run "print('Hello World')"
# Execute shell command
jupyter-remote-runner run "!ls -la"
# Execute bash magic
jupyter-remote-runner run "%%bash\necho 'Hello from bash'"
# Continue previous command output
jupyter-remote-runner run " "
# Interrupt running command
jupyter-remote-runner run "C-c"
# Execute with custom timeout
jupyter-remote-runner run "import time; time.sleep(10)" --timeout 15
# Check status
jupyter-remote-runner status
# Stop the daemon
jupyter-remote-runner stop
Features
- Persistent Kernel: Maintains state between commands
- Streaming Output: Real-time output streaming
- Timeout Support: Configurable execution timeouts
- Cross-Platform: Works on Windows, macOS, and Linux
- Background Daemon: Runs kernel in background process
- Signal Handling: Support for interrupting long-running commands
- Input Support: Handle Python input() calls
Development
Run tests:
python test_cli.py
Run directly from source:
python -m jupyter_remote_runner --help
Release files for jupyter-remote-runner 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_remote_runner-0.1.1.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_remote_runner-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / jupyter_remote_runner-0.1.1.tar.gz
| Download URL | jupyter_remote_runner-0.1.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85b8f64501648ed5cdd02c3e65c3d5da1d834ac7a6963e5a5df40929d5f3b841
|
|
BLAKE2b-256 checksum How to use checksums |
1df3171ad814eb5f1643a7393e88bfae22ae71ffd923b4a0e2739f03f87e504d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.0 Windows/11
|
Release files / jupyter_remote_runner-0.1.1-py3-none-any.whl
| Download URL | jupyter_remote_runner-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cde2de1a84048253000d78ef43dee1ab4618cf23ffca41838708a8c7f43b12a3
|
|
BLAKE2b-256 checksum How to use checksums |
be4c6ef5e6903b46f716f8396bac534ca594d2f5528e8b5007e5a11adb9b40c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.0 Windows/11
|