Skip to content

drorspei/bgipykernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bgipykernel - %bg in jupyter

Install using pip install bgipykernel

Add the following line to your ipython_kernel_config.py file:

c.IPKernelApp.kernel_class = 'bgipykernel.NoAsyncLockBgIPythonKernel'

if you can't find your config file, run ipython profile locate.

features

  • Move running cells to the background by running %bg
  • List background cells using %jobs
  • Kill them using %kill
Screencast.from.2025-11-28.15-29-14.mp4
  • Run multiple cells with await concurrently
Screencast.from.2025-11-28.14-42-47.mp4

available configurations

  • If you just want to use await in multiple cells concurrently, use bgipykernel.NoAsyncLockIPythonKernel
  • If you just want %bg, use bgipykernel.BgIPythonKernel
  • If you want both, use bgipykernel.NoAsyncLockBgIPythonKernel

trouble

When using a %bg variant (i.e. BgIPythonKernel or NoAsyncLockBgIPythonKernel), interrupting the kernel can only happen at the byte code level, meaning functions like time.sleep don't get interrupted.

About

Alternative IPythonKernel with concurrent cell running in jupyter using %bg and await

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages