{"id":28261,"library":"spreadmagic","title":"SpreadMagic","description":"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.","status":"active","version":"2.6.1","language":"python","source_language":"en","source_url":"https://github.com/uniras/SpreadMagic","tags":["jupyter","magic","pyscript","spreadsheet","colab"],"install":[{"cmd":"pip install spreadmagic","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for magic command integration with Jupyter/Colab","package":"ipython","optional":false},{"reason":"Used to execute Python in iframe via Pyodide","package":"pyscript","optional":false}],"imports":[{"wrong":"from spreadmagic import load_spreadmagic","symbol":"load_spreadmagic","correct":"from spreadmagic import load_spreadmagic"}],"quickstart":{"code":"from spreadmagic import load_spreadmagic\nload_spreadmagic()\n%%spread\nimport pandas as pd\ndf = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})\ndf","lang":"python","description":"Load the magic command and use %%spread to display a DataFrame as an interactive spreadsheet in Jupyter/Colab."},"warnings":[{"fix":"Use in a Jupyter environment only.","message":"The %%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).","severity":"gotcha","affected_versions":"all"},{"fix":"Change to 'from spreadmagic import load_spreadmagic' then call 'load_spreadmagic()'.","message":"The previous import pattern 'import spreadmagic' or 'from spreadmagic import spread' no longer works. The correct function is load_spreadmagic().","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Keep output size reasonable; for plots, consider using traditional Jupyter output instead.","message":"The iframe may not render correctly if the output is too large or contains certain libraries (e.g., matplotlib) due to PyScript limitations.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.6.1':37 'activ':38 'cell':23 'code':20,22 'colab':16,44 'command':11 'current':35 'enabl':29 'execut':18 'googl':15 'ifram':28 'interact':30 'jupyt':13,40 'like':33 'magic':10,41 'maintain':39 'output':34 'packag':6 'provid':8 'pyscript':25,42 'python':5,19 'spreadmag':1,2 'spreadsheet':32,43 'spreadsheet-lik':31 'use':24 'version':36 'within':26","created_at":"2026-05-09T05:54:34.201685+00:00","updated_at":"2026-05-09T05:54:34.201685+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpccjjkbie/venv/lib/python3.12/site-packages/spreadmagic/__init__.py\", line 1, in <module>\n    from .spreadmagic import register_smagic, run_spreadscript  # noqa\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/uniras/SpreadMagic","docs":null,"changelog":null,"pypi":"https://pypi.org/project/spreadmagic/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}