Skip to content

Asynchroneous jupyter code cell execution for python, bash, powershell, and cmd.

License

Notifications You must be signed in to change notification settings

amadou-6e/ipython-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPython Async

Run cells asynchronously in IPython/Jupyter across multiple shells (cmd, bash, python, powershell).

Installation

pip install ipython-async

Usage

Load the extension in your Jupyter notebook or IPython session:

%load_ext ipython_async

Available Cell Magics

%%asynccmd

Execute shell commands asynchronously using the system's default shell.

%%asynccmd
echo "This command runs in the background"
sleep 5
echo "Command finished"

%%asyncbash

Execute Bash commands asynchronously (works on Windows, Mac, and Linux).

%%asyncbash
for i in {1..5}; do
    echo "Processing item $i"
    sleep 1
done
echo "All items processed"

%%asyncpowershell

Execute PowerShell commands asynchronously (Windows only).

%%asyncpowershell
1..5 | ForEach-Object {
    Write-Output "Processing item $_"
    Start-Sleep -Seconds 1
}
Write-Output "All items processed"

%%asyncpython

Execute Python code asynchronously in a separate process.

%%asyncpython
import time

for i in range(5):
    print(f"Processing item {i+1}")
    time.sleep(1)
    
print("All items processed")

Features

  • Non-blocking execution - continue working in your notebook while commands run
  • Live output streaming
  • Cross-platform compatibility
  • Support for multiple shell environments
  • Simple, intuitive interface

Requirements

  • Python 3.6+
  • IPython 7.0+
  • ipywidgets 7.0+

License

MIT License

About

Asynchroneous jupyter code cell execution for python, bash, powershell, and cmd.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published