{"id":14970853,"url":"https://github.com/astariul/swole","last_synced_at":"2025-10-26T13:31:38.795Z","repository":{"id":49282349,"uuid":"291674182","full_name":"astariul/swole","owner":"astariul","description":"Streamlit, but better.","archived":false,"fork":false,"pushed_at":"2024-02-05T23:53:16.000Z","size":1571,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-28T13:41:25.182Z","etag":null,"topics":["doge","fast-api","hacktoberfest","open-source","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astariul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-31T09:37:26.000Z","updated_at":"2024-07-16T14:58:42.000Z","dependencies_parsed_at":"2024-02-06T00:48:43.959Z","dependency_job_id":null,"html_url":"https://github.com/astariul/swole","commit_stats":{"total_commits":144,"total_committers":4,"mean_commits":36.0,"dds":0.04861111111111116,"last_synced_commit":"a932cd8cf8c7c0bb41e22dcdcec426fdc849d241"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fswole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fswole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fswole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astariul%2Fswole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astariul","download_url":"https://codeload.github.com/astariul/swole/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219862885,"owners_count":16555951,"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":["doge","fast-api","hacktoberfest","open-source","streamlit"],"created_at":"2024-09-24T13:44:14.609Z","updated_at":"2025-10-26T13:31:32.958Z","avatar_url":"https://github.com/astariul.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003eswole\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nStreamlit, but better.\n\u003c/p\u003e\n\n_⚠️ For now this is an Alpha version, only a **proof-of-concept**. Only minimal features are implemented_\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/astariul/swole/actions\"\u003e\u003cimg src=\"https://github.com/astariul/swole/workflows/tests/badge.svg\" alt=\"test status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/astariul/swole/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/astariul/swole\" alt=\"release\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://swole.readthedocs.io/en/latest/\"\u003e\u003cimg src=\"https://readthedocs.org/projects/swole/badge/?version=latest\" alt=\"doc status\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#description\"\u003eDescription\u003c/a\u003e •\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"https://github.com/astariul/swole/tree/master/examples\"\u003eExamples\u003c/a\u003e •\n  \u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e •\n  \u003ca href=\"#contribute\"\u003eContribute\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://swole.readthedocs.io/en/stable/\" target=\"_blank\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/astariul/swole/master/.github/swole.png\" width=\"350\"\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eDescription\u003c/h2\u003e\n\n[`streamlit`](https://github.com/streamlit/streamlit) is a framework that let you build beautiful apps in only a few lines of code, with only pure python.\n\n`swole` is doing the same job, with additional features :\n\n* **⚡ Highly performant** with [`FastAPI`](https://fastapi.tiangolo.com/) as backend\n* **🦋 Easily customizable** through the usage of skins\n* **💎 Transparent** (`streamlit` is opaque)\n* **\u003cimg src=\"https://raw.githubusercontent.com/astariul/swole/master/.github/emoji.png\" width=\"24\"\u003e Doge power !**\n\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\nSimply run :\n\n```console\npip install swole\n```\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\nCreate a few `Widget` for your page :\n\n```python\nfrom swole.widgets import Input, Button, Markdown\n\ni_a = Input()\ni_b = Input()\nm = Markdown(\"Result : \")\n```\n\n---\n\nAdd some callbacks through AJAX requests :\n\n```python\nfrom swole import ajax\n\n@ajax(i_a, i_b)\ndef addition(a, b):\n    res = a + b\n    m.set(\"Result : {}\".format(res))\n\nButton(\"Compute\", onclick=addition)\n```\n\n---\n\nServe your app :\n\n```python\nfrom swole import Application\n\nif __name__ == \"__main__\":\n    Application().serve()\n```\n\n---\n\nVisit [`127.0.0.1:8000`](http://127.0.0.1:8000) :\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/40822797/105612487-d9f9c300-5dff-11eb-8919-efbd3ff07df4.gif\" width=\"79%\"\u003e\n\u003c/p\u003e\n\n---\n\n_For more examples, check the [`examples`](https://github.com/astariul/swole/tree/master/examples) folder !_\n\n\u003ch2 align=\"center\"\u003eFAQ\u003c/h2\u003e\n\n#### **Why using `swole` ? Why not `streamlit` ?**\n\nDon't get me wrong, `streamlit` is an awesome framework. `swole` just try to fix a few problematic issues of `streamlit` :\n\n* It uses `Flask`, which is outdated and not performant when compared to `FastAPI`.\n* No customization possible\n* No control over user's interaction with the page\n* Not transparent\n* No Doge 😢\n\n#### **How `swole`'s backend and frontend communicate ?**\n\nUnlike `streamlit`, which use a system of cache and reload the page everytime someone interact with it, `swole` uses AJAX requests to update the frontend.\n\nReloading the page every interaction is very inefficient, and irritating for the user's experience.\n\nUsing AJAX instead makes the whole process almost invisible for the user, and everything is more clear for the developer because we know what data is sent when.\n\n#### **Why do you say `swole` is \"transparent\" but `streamlit` is \"opaque\" ?**\n\nOn a `swole` page, try to \"view the page source\" (right-click).  \nNow, do the same on a `streamlit` page, and compare. 😇 \n\n#### **Why this name ?**\n\nIt all comes from a meme :\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/astariul/swole/master/.github/meme.png\" width=\"450\"\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eContribute\u003c/h2\u003e\n\nFork the repository, clone it locally, install it and create your own branch :\n\n```console\ngit clone https://github.com/astariul/swole.git\ncd swole\npip install -e .\ngit checkout -b my_branch\n```\n\n---\n\nAdd your dogesome code !\n\n_Don't forget to update tests and documentation !_\n\n---\n\nCheck if code is well-formated :\n\n```console\npip install flake8\n\nflake8 . --count --max-complexity=10 --max-line-length=127 --statistics --per-file-ignores=\"__init__.py:F401\"\n```\n\n---\n\nEnsure tests are passing :\n\n```console\npip install pytest\n\npython -m pytest -W ignore::DeprecationWarning\n```\n\n---\n\nSubmit your PR !","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastariul%2Fswole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastariul%2Fswole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastariul%2Fswole/lists"}