{"id":8658,"library":"solara","title":"Solara","description":"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.","status":"active","version":"1.57.3","language":"en","source_language":"en","source_url":"https://github.com/widgetti/solara","tags":["web framework","dashboard","ipywidgets","react-like","jupyter","fastapi","data app"],"install":[{"cmd":"pip install solara","lang":"bash","label":"Standard Installation"}],"dependencies":[{"reason":"Core UI component foundation.","package":"ipywidgets","optional":false},{"reason":"Required for running standalone Solara applications outside Jupyter.","package":"solara-server","optional":false},{"reason":"Common backend for standalone Solara applications.","package":"FastAPI","optional":true},{"reason":"Alternative backend for standalone Solara applications.","package":"Starlette","optional":true}],"imports":[{"note":"Primary import for all Solara components and functions.","symbol":"solara","correct":"import solara"}],"quickstart":{"code":"import solara\n\nsentence = solara.reactive(\"Solara makes our team more productive.\")\nword_limit = solara.reactive(10)\n\n@solara.component\ndef Page():\n    word_count = len(sentence.value.split())\n    solara.SliderInt(\"Word limit\", value=word_limit, min=2, max=20)\n    solara.InputText(label=\"Your sentence\", value=sentence, continuous_update=True)\n\n    if word_count >= int(word_limit.value):\n        solara.Error(f\"With {word_count} words, you passed the word limit of {word_limit.value}.\")\n    elif word_count >= int(0.8 * word_limit.value):\n        solara.Warning(f\"With {word_count} words, you are close to the word limit of {word_limit.value}.\")\n    else:\n        solara.Success(\"Great short writing!\")\n\n# To run this in a .py file from the command line: `solara run your_app.py`\n# To run this in a Jupyter Notebook cell, add the following line at the end:\n# Page()","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade your Python environment to 3.8 or newer.","message":"Solara dropped support for Python 3.7. Applications running on Python 3.7 will not be compatible with Solara versions 1.56.0 and higher.","severity":"breaking","affected_versions":">=1.56.0"},{"fix":"Use `solara.reactive()` for application-wide or session-wide state. Use `solara.use_state()` within components for local, isolated state.","message":"When defining state, `solara.reactive()` creates global, per-session state, while `solara.use_state()` creates component-specific local state. Using `solara.reactive()` for local component state can lead to unexpected behavior across multiple instances of the same component.","severity":"gotcha","affected_versions":"All"},{"fix":"Add `Page()` (or the name of your main component function) as the last line in the Jupyter Notebook cell containing your Solara app code.","message":"When running Solara applications directly in a Jupyter Notebook cell, you must explicitly call the main `@solara.component` (typically `Page`) at the end of the cell (e.g., `Page()`) for it to render. This is not necessary when running with `solara run`.","severity":"gotcha","affected_versions":"All"},{"fix":"Upgrade Solara to version 1.57.2 or higher to address the path traversal vulnerability.","message":"A security fix (CVE-2026-24008) for a path traversal vulnerability in `path_is_child_of` was implemented. Older versions may be vulnerable.","severity":"breaking","affected_versions":"<1.57.2"},{"fix":"Ensure the `$HOME` environment variable is set to a writable directory within your Docker container or development environment.","message":"Solara server in Docker environments may fail to start if the `$HOME` environment variable is not set or points to a non-writable directory, even if a bug fix for this was implemented in v1.50.1.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install solara` to install the library.","cause":"The Solara library has not been installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'solara'"},{"fix":"Upgrade Solara to version 1.55.0 or higher. `pip install --upgrade solara`","cause":"This error can occur in Solara versions prior to 1.55.0 when running with Python 3.14 due to compatibility issues with `BaseSettings`.","error":"RuntimeError in BaseSettings iteration"},{"fix":"Add `Page()` at the end of the Jupyter Notebook cell to render the Solara application.","cause":"The main component function (e.g., `Page`) was not explicitly called at the end of the Jupyter cell.","error":"Solara app not rendering in Jupyter Notebook"}]}