
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
pyview-web
Advanced tools
A Python implementation of Phoenix LiveView
PyView enables dynamic, real-time web apps, using server-rendered HTML.
Documentation: https://pyview.rocks
Source Code: https://github.com/ogrodnek/pyview
pip install pyview-web
There's a cookiecutter template available
cookiecutter gh:ogrodnek/pyview-cookiecutter
https://examples.pyview.rocks/
count.py:
from pyview import LiveView, LiveViewSocket
from typing import TypedDict
class CountContext(TypedDict):
count: int
class CountLiveView(LiveView[CountContext]):
async def mount(self, socket: LiveViewSocket[CountContext], _session):
socket.context = {"count": 0}
async def handle_event(self, event, payload, socket: LiveViewSocket[CountContext]):
if event == "decrement":
socket.context["count"] -= 1
if event == "increment":
socket.context["count"] += 1
async def handle_params(self, url, params, socket: LiveViewSocket[CountContext]):
if "c" in params:
socket.context["count"] = int(params["c"][0])
count.html:
<div>
<h1>Count is {{count}}</h1>
<button phx-click="decrement">-</button>
<button phx-click="increment">+</button>
</div>
Obviously this project wouldn't exist without Phoenix LiveView, which is a wonderful paradigm and implementation. Besides using their ideas, we also directly use the LiveView JavaScript code.
Thanks to Donnie Flood for the encouragement, inspiration, help, and even pull requests to get this project started! Check out LiveViewJS for a TypeScript implementation of LiveView (that's much more mature than this one!)
Thanks to Darren Mulholland for both his Let's Build a Template Language tutorial, as well as his ibis template engine, which he very generously released into the public domain, and forms the basis of templating in PyView.
PyView 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.
uv sync
uv run uvicorn examples.app:app --reload
Then go to http://localhost:8000/
brew install uv
or
curl -LsSf https://astral.sh/uv/install.sh | sh
(see https://docs.astral.sh/uv/getting-started/installation/ for more details)
PyView is licensed under the MIT License.
FAQs
LiveView in Python
We found that pyview-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.