Solara is an open-source Python library designed to simplify building reactive web applications using ipywidgets and a React-like API. It allows developers to create sophisticated data apps that run seamlessly both within Jupyter Notebooks and as standalone web applications, leveraging frameworks like FastAPI or Starlette. Solara is currently on version 1.57.3 and maintains an active release cadence with frequent updates and bug fixes.
pip install solaraVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a simple interactive Solara application with reactive state. It includes a text input and a slider, with dynamic feedback based on word count. Save this as a `.py` file (e.g., `app.py`) and run it using `solara run app.py` from your terminal. For Jupyter Notebooks, append `Page()` to display the component.
Upgrade your Python environment to 3.8 or newer.
Use `solara.reactive()` for application-wide or session-wide state. Use `solara.use_state()` within components for local, isolated state.
Add `Page()` (or the name of your main component function) as the last line in the Jupyter Notebook cell containing your Solara app code.
Upgrade Solara to version 1.57.2 or higher to address the path traversal vulnerability.
Ensure the `$HOME` environment variable is set to a writable directory within your Docker container or development environment.
Run `pip install solara` to install the library.
Upgrade Solara to version 1.55.0 or higher. `pip install --upgrade solara`
Add `Page()` at the end of the Jupyter Notebook cell to render the Solara application.