Registry / data / spreadmagic

spreadmagic

JSON →
library2.6.1pypypiunverified

SpreadMagic is a Python package that provides a magic command for Jupyter and Google Colab to execute Python code in code cells using PyScript within an iframe, enabling interactive spreadsheet-like outputs. Current version 2.6.1, actively maintained.

pip install spreadmagic
INSTALL
IMPORT
SIG · SPREADMAGIC
S
spreadmagic
datapythonv2.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load_spreadmagic
from spreadmagic import load_spreadmagic
from spreadmagic import load_spreadmagic

Load the magic command and use %%spread to display a DataFrame as an interactive spreadsheet in Jupyter/Colab.

from spreadmagic import load_spreadmagic load_spreadmagic() %%spread import pandas as pd df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}) df
Debug
Known issues
gotchaThe %%spread magic only works in Jupyter Notebook, JupyterLab, or Google Colab. It will not work in standard Python scripts or IDEs like VS Code (unless using a Jupyter extension).
fix
Use in a Jupyter environment only.
affects: all
deprecatedThe previous import pattern 'import spreadmagic' or 'from spreadmagic import spread' no longer works. The correct function is load_spreadmagic().
fix
Change to 'from spreadmagic import load_spreadmagic' then call 'load_spreadmagic()'.
affects: >=2.0.0
gotchaThe iframe may not render correctly if the output is too large or contains certain libraries (e.g., matplotlib) due to PyScript limitations.
fix
Keep output size reasonable; for plots, consider using traditional Jupyter output instead.
affects: all
Upgrade
Version history
2.6.1latest on PyPI · released Mar 1, 2025
Audit
Dependencies
ipythonrequiredRequired for magic command integration with Jupyter/Colab
pyscriptrequiredUsed to execute Python in iframe via Pyodide
Agent activity
3 hits · last 30 days
node
2
OpenAI (training)
1
Resources
spreadmagic — pip install spreadmagic · libregistry