Jupyter Notebook Integration
May 30, 2026 | 5 min read
IPython Magic Command
Register a cell magic for one-click compilation:
from IPython.core.magic import register_cell_magic
@register_cell_magic
def pyvorin(line, cell):
import tempfile, subprocess, os
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
f.write(cell)
f.flush()
subprocess.run(['pyvorin', 'run', f.name])
os.unlink(f.name)
Usage in a notebook cell:
%%pyvorin
def main():
return sum(range(1000000))
print(main())
Google Colab
!pip install pyvorin-thin --extra-index-url https://pypi.pyvorin.com/simple
!pyvorin init
!pyvorin activate PYV-XXXX-XXXX-XXXX
Kaggle Notebooks
Add Pyvorin to your Kaggle notebook via the Settings → Add-ons panel or a pip install cell at the top of your notebook.