Run cells asynchronously in IPython/Jupyter across multiple shells
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipython_async-0.1.0.tar.gz.
File metadata
- Download URL: ipython_async-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49e677788a5354ad2bf1bd4656f2491b835224f35a415bbd632462babac1e092
|
|
| MD5 |
71852f03e8d5cd40318290075e9103dc
|
|
| BLAKE2b-256 |
ce4e539ed3aad9aae6dcea4b0c71debccd674d142d20035e58810bfe4e3d2633
|
File details
Details for the file ipython_async-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ipython_async-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f116b29113e6f2eef0fa4dde895766839eed765bb5b669a47332e7d67dfa10e
|
|
| MD5 |
c3ff0a2f23bb416034a2dfef917d04ea
|
|
| BLAKE2b-256 |
155f329032b7e543c8ede0b392f45c20bd1cf9911f9f7e3fc1bbe05725a04958
|