{"id":13994093,"url":"https://github.com/widgetti/solara","last_synced_at":"2025-05-12T15:26:34.761Z","repository":{"id":47920297,"uuid":"467834772","full_name":"widgetti/solara","owner":"widgetti","description":"A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps","archived":false,"fork":false,"pushed_at":"2025-05-09T06:34:57.000Z","size":40133,"stargazers_count":2032,"open_issues_count":275,"forks_count":157,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-09T07:40:44.614Z","etag":null,"topics":["dataapp","fastapi","flask","ipywidgets","jupyter","starlette","webapp"],"latest_commit_sha":null,"homepage":"https://solara.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/widgetti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-09T08:12:01.000Z","updated_at":"2025-05-09T06:35:00.000Z","dependencies_parsed_at":"2024-04-15T16:30:58.644Z","dependency_job_id":"723b7c22-2030-4e02-b0c3-ec6c352615ae","html_url":"https://github.com/widgetti/solara","commit_stats":{"total_commits":1579,"total_committers":43,"mean_commits":36.72093023255814,"dds":0.2583913869537682,"last_synced_commit":"89d1cac83789ad1be3da17dee475312c697329d8"},"previous_names":[],"tags_count":147,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widgetti%2Fsolara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widgetti%2Fsolara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widgetti%2Fsolara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widgetti%2Fsolara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/widgetti","download_url":"https://codeload.github.com/widgetti/solara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253764788,"owners_count":21960631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataapp","fastapi","flask","ipywidgets","jupyter","starlette","webapp"],"created_at":"2024-08-09T14:02:42.138Z","updated_at":"2025-05-12T15:26:34.733Z","avatar_url":"https://github.com/widgetti.png","language":"Python","readme":"**A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps**\n\n[![solara logo](https://solara.dev/static/assets/images/logo.svg)](https://solara.dev)\n\nCome chat with us on [Discord](https://discord.solara.dev) to ask questions or share your thoughts or creations!\n\n[![Discord Shield](https://discordapp.com/api/guilds/1106593685241614489/widget.png?style=banner2)](https://discord.solara.dev)\n\n\n\n## Introducing Solara\n\nWhile there are many Python web frameworks out there, most are designed for small data apps or use paradigms unproven for larger scale. Code organization, reusability, and state tend to suffer as apps grow in complexity, resulting in either spaghetti code or offloading to a React application.\n\nSolara addresses this gap. Using a React-like API, we don't need to worry about scalability. React has already proven its ability to support the world's largest web apps.\n\nSolara uses a pure Python implementation of React (Reacton), creating ipywidget-based applications. These apps work both inside the Jupyter Notebook and as standalone web apps with frameworks like FastAPI. This paradigm enables component-based code and incredibly simple state management.\n\nBy building on top of ipywidgets, we automatically leverage an existing ecosystem of widgets and run on many platforms, including JupyterLab, Jupyter Notebook, Voilà, Google Colab, DataBricks, JetBrains Datalore, and more.\n\nWe care about developer experience. Solara will give your hot code reloading and type hints for faster development.\n\n## Installation\n\nRun:\n```\npip install solara\n```\n\nOr follow the [Installation instructions](https://solara.dev/documentation/getting_started/installing) for more detailed instructions.\n\n## First script\n\nPut the following Python snippet in a file (we suggest `sol.py`), or put it in a Jupyter notebook cell:\n\n```python\nimport solara\n\n# Declare reactive variables at the top level. Components using these variables\n# will be re-executed when their values change.\nsentence = solara.reactive(\"Solara makes our team more productive.\")\nword_limit = solara.reactive(10)\n\n\n@solara.component\ndef Page():\n    # Calculate word_count within the component to ensure re-execution when reactive variables change.\n    word_count = len(sentence.value.split())\n\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    # Display messages based on the current word count and word limit.\n    if word_count \u003e= 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 \u003e= 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\n# The following line is required only when running the code in a Jupyter notebook:\nPage()\n```\n\nRun from the command line in the same directory where you put your file (`sol.py`):\n\n```bash\n$ solara run sol.py\nSolara server is starting at http://localhost:8765\n```\n\nOr copy-paste this to a Jupyter notebook cell and execute it (the `Page()` expression at the end\nwill cause it to automatically render the component in the notebook).\n\nSee this snippet run live at https://solara.dev/documentation/getting_started\n\n## Demo\n\nThe following demo app can be used to explore a dataset (build in or upload yourself) using\na scatter plot. The plot can be interacted with to filter the dataset, and the filtered dataset can\nbe downloaded.\n\n * [Source code](https://github.com/widgetti/solara/blob/master/solara/website/pages/apps/scatter.py)\n\n### Running in solara-server\n\nThe solara server is build on top of Starlette/FastAPI and runs standalone. Ideal for production use.\n\n![fastapi](https://global.discourse-cdn.com/standard11/uploads/jupyter/original/2X/9/9442fc70e2a1fcd201f4f900fa073698a1f8c937.gif)\n\n\n### Running in Jupyter\n\nBy building on top of ipywidgets, we automatically leverage an existing ecosystem of widgets and run on many platforms, including JupyterLab, Jupyter Notebook, Voilà, Google Colab, DataBricks, JetBrains Datalore, and more. This means our app can also run in Jupyter:\n\n![jupyter](https://global.discourse-cdn.com/standard11/uploads/jupyter/original/2X/8/8bc875c0c3845ae077168575a4f8a49cf1b35bc6.gif)\n\n## Resources\n\nVisit our main website or jump directly to the introduction\n\n[![Introduction](https://dabuttonfactory.com/button.png?t=Introduction\u0026f=Open+Sans-Bold\u0026ts=20\u0026tc=fff\u0026hp=45\u0026vp=12\u0026c=8\u0026bgt=unicolored\u0026bgc=f19f41)](https://solara.dev/documentation/getting_started/introduction)\n[![Quickstart](https://dabuttonfactory.com/button.png?t=Quickstart\u0026f=Open+Sans-Bold\u0026ts=20\u0026tc=fff\u0026hp=45\u0026vp=12\u0026c=8\u0026bgt=unicolored\u0026bgc=f19f41)](https://solara.dev/documentation/getting_started)\n\n*Note that the solara.dev website is created using Solara*\n","funding_links":[],"categories":["🎯 Tool Categories","Python"],"sub_categories":["🎨 ML User Interfaces"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwidgetti%2Fsolara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwidgetti%2Fsolara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwidgetti%2Fsolara/lists"}