@solara.component def Counter(): def increment(): count.value += 1
No HTML, no JS, no callbacks – just Python. User's Browser │ ▼ React.js (runtime) ←────── WebSocket/HTTP │ │ ▼ ▼ Solara Python Components ←→ FastAPI Server │ ▼ ipywidgets & Reactive State Solara renders components on the server, manages reactive state, and syncs UI updates to the browser via WebSockets. Who Is Behind Solara? Solara is developed by Widgetti , the same company behind ipywidgets and Jupyter Widgets ecosystem. This means Solara benefits from deep integration with Jupyter and production-grade stability. Comparison with Other Python UI Frameworks | Framework | Syntax | React-style Hooks | Jupyter Support | Scalability | |-----------|--------|------------------|----------------|--------------| | Solara | Python | ✅ Yes | ✅ Native | High | | Streamlit | Python | ❌ (script rerun) | Limited | Medium | | Dash | Python/HTML | ❌ (callbacks) | ❌ | High | | Shiny for Python | Python | ❌ (reactive calc) | ✅ | Medium | | Gradio | Python | ❌ | ✅ (notebook) | Low | Getting Started Installation pip install solara Create a simple app Save as app.py :
def add_todo(): if text.value.strip(): todos.value = todos.value + ["text": text.value, "done": False] text.value = "" github solara
solara.Button(label=f"Clicked count.value times", on_click=increment)
solara.InputText(label="New todo", value=text, on_value_change=text.set) solara.Button("Add", on_click=add_todo) @solara.component def TodoList(): def toggle(index): new_todos = todos.value.copy() new_todos[index]["done"] = not new_todos[index]["done"] todos.value = new_todos @solara
import solara @solara.component def Page(): with solara.Column(): solara.Markdown("# Hello Solara") solara.Success("It works!") Run the app solara run app.py Open http://localhost:8765 Advanced Example: Todo App import solara todos = solara.reactive([])
Here’s an informative overview of on GitHub. What is Solara? Solara is a pure Python, React-style web framework for building scalable and interactive web apps, specifically designed for data scientists and Python developers. It is built on top of React and FastAPI , but you don't need to know any JavaScript or HTML to use it. Solara is developed by Widgetti , the same
@solara.component def TodoInput(): text = solara.reactive("")