{"id":19896678,"url":"https://github.com/ogrodnek/pyview","last_synced_at":"2026-01-28T05:33:28.902Z","repository":{"id":172093431,"uuid":"629746738","full_name":"ogrodnek/pyview","owner":"ogrodnek","description":"A Python implementation of Phoenix LiveView","archived":false,"fork":false,"pushed_at":"2026-01-18T02:33:48.000Z","size":2839,"stargazers_count":63,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-18T14:39:33.520Z","etag":null,"topics":["liveview","python","web","websockets"],"latest_commit_sha":null,"homepage":"https://pyview.rocks/","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/ogrodnek.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-19T00:18:11.000Z","updated_at":"2026-01-18T14:29:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ae5ba91-8474-4cda-9b7a-6eb29c81d6b5","html_url":"https://github.com/ogrodnek/pyview","commit_stats":null,"previous_names":["ogrodnek/pyview"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/ogrodnek/pyview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodnek%2Fpyview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodnek%2Fpyview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodnek%2Fpyview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodnek%2Fpyview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogrodnek","download_url":"https://codeload.github.com/ogrodnek/pyview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodnek%2Fpyview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28588971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["liveview","python","web","websockets"],"created_at":"2024-11-12T18:40:04.393Z","updated_at":"2026-01-19T23:07:50.763Z","avatar_url":"https://github.com/ogrodnek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://pyview.rocks/images/pyview_logo_512.png\" width=\"128px\" align=\"right\" /\u003e\n\n# PyView\n\n\u003e A Python implementation of Phoenix LiveView\n\nPyView enables dynamic, real-time web apps, using server-rendered HTML.\n\n**Documentation**: \u003ca href=\"https://pyview.rocks\" target=\"_blank\"\u003ehttps://pyview.rocks\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/ogrodnek/pyview\" target=\"_blank\"\u003ehttps://github.com/ogrodnek/pyview\u003c/a\u003e\n\n# Installation\n\n`pip install pyview-web`\n\n## Quickstart\n\nThere's a [cookiecutter](https://github.com/cookiecutter/cookiecutter) template available\n\n```\ncookiecutter gh:ogrodnek/pyview-cookiecutter\n```\n\n# Live Examples\n\n[https://examples.pyview.rocks/](https://examples.pyview.rocks/)\n\n## Other Examples\n\n- [pyview AI chat](https://github.com/pyview/pyview-example-ai-chat)\n- [pyview auth example](https://github.com/pyview/pyview-example-auth) (using [authlib](https://docs.authlib.org/en/latest/))\n\n## Simple Counter\n\n[See it live!](https://examples.pyview.rocks/count)\n\ncount.py:\n\n```python\nfrom pyview import LiveView, LiveViewSocket\nfrom typing import TypedDict\n\n\nclass CountContext(TypedDict):\n    count: int\n\n\nclass CountLiveView(LiveView[CountContext]):\n    async def mount(self, socket: LiveViewSocket[CountContext], _session):\n        socket.context = {\"count\": 0}\n\n    async def handle_event(self, event, payload, socket: LiveViewSocket[CountContext]):\n        if event == \"decrement\":\n            socket.context[\"count\"] -= 1\n\n        if event == \"increment\":\n            socket.context[\"count\"] += 1\n\n    async def handle_params(self, url, params, socket: LiveViewSocket[CountContext]):\n        if \"c\" in params:\n            socket.context[\"count\"] = int(params[\"c\"][0])\n```\n\ncount.html:\n\n```html\n\u003cdiv\u003e\n  \u003ch1\u003eCount is {{count}}\u003c/h1\u003e\n  \u003cbutton phx-click=\"decrement\"\u003e-\u003c/button\u003e\n  \u003cbutton phx-click=\"increment\"\u003e+\u003c/button\u003e\n\u003c/div\u003e\n```\n\n# Acknowledgements\n\n- Obviously this project wouldn't exist without [Phoenix LiveView](https://github.com/phoenixframework/phoenix_live_view), which is a wonderful paradigm and implementation. Besides using their ideas, we also directly use the LiveView JavaScript code.\n- Thanks to [Donnie Flood](https://github.com/floodfx) for the encouragement, inspiration, help, and even pull requests to get this project started! Check out [LiveViewJS](https://github.com/floodfx/liveviewjs) for a TypeScript implementation of LiveView (that's much more mature than this one!)\n\n- Thanks to [Darren Mulholland](https://github.com/dmulholl) for both his [Let's Build a Template Language](https://www.dmulholl.com/lets-build/a-template-language.html) tutorial, as well as his [ibis template engine](https://github.com/dmulholl/ibis), which he very generously released into the public domain, and forms the basis of templating in PyView.\n\n## Additional Thanks\n\n- We're using the [pubsub implementation from flet](https://github.com/flet-dev/flet)\n- PyView is built on top of [Starlette](https://www.starlette.io/).\n\n# Status\n\nPyView is in the very early stages of active development. Please check it out and give feedback! Note that the API is likely to change, and there are many features that are not yet implemented.\n\n# Running the included Examples\n\n## Setup\n\n```\nuv sync\n```\n\n## Running\n\n```\nuv run uvicorn examples.app:app --reload\n```\n\nThen go to http://localhost:8000/\n\n### uv Install\n\n```\nbrew install uv\n```\n\nor\n\n```\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n(see https://docs.astral.sh/uv/getting-started/installation/ for more details)\n\n# License\n\nPyView is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogrodnek%2Fpyview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogrodnek%2Fpyview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogrodnek%2Fpyview/lists"}