https://github.com/hotframe/hotframe
Modular Python web framework with hot-mount dynamic modules and stateful WebSocket-driven LiveComponents.
https://github.com/hotframe/hotframe
fastapi jinja2 live-component plugin-system python server-rendered sqlalchemy web-framework websocket
Last synced: about 1 month ago
JSON representation
Modular Python web framework with hot-mount dynamic modules and stateful WebSocket-driven LiveComponents.
- Host: GitHub
- URL: https://github.com/hotframe/hotframe
- Owner: hotframe
- License: other
- Created: 2026-05-09T22:05:02.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-19T22:15:52.000Z (about 1 month ago)
- Last Synced: 2026-05-20T01:37:48.324Z (about 1 month ago)
- Topics: fastapi, jinja2, live-component, plugin-system, python, server-rendered, sqlalchemy, web-framework, websocket
- Language: Python
- Homepage: https://hotframe.dev
- Size: 1.97 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Modular Python web framework with hot-mount dynamic modules and stateful, WebSocket-driven LiveComponents.
---
## What hotframe is
hotframe is a Python web framework that combines FastAPI, SQLAlchemy 2.0, and Jinja2 under Django-like ergonomics. It adds two pieces:
- **A hot-mount module engine** — install, activate, deactivate, and uninstall plugins at runtime without restarting the process.
- **`LiveComponent`** — stateful, server-rendered components driven by a single WebSocket per page. Server holds the state; the client streams events and applies HTML patches with `morphdom`. No client-side framework, no build step.
## Install
```bash
pip install hotframe
```
## Quickstart
```bash
hf startproject myapp
cd myapp
hf runserver
```
```
INFO hotframe.bootstrap Application started in 142ms
INFO uvicorn.error Uvicorn running on http://127.0.0.1:8000
```
## A LiveComponent in 30 seconds
```python
# modules/todo/components/todo_list/component.py
from hotframe.live import LiveComponent, event
from modules.todo.models import Todo
class TodoList(LiveComponent):
user_id: int # prop
items: list = [] # state
new_text: str = ""
async def on_mount(self) -> None:
self.items = await Todo.where(user_id=self.user_id).all()
@event("toggle")
async def toggle(self, todo_id: str) -> None:
t = next(t for t in self.items if str(t.id) == todo_id)
t.done = not t.done
await t.save()
@event("add")
async def add(self) -> None:
if not self.new_text.strip():
return
await Todo.create(user_id=self.user_id, text=self.new_text)
self.items = await Todo.where(user_id=self.user_id).all()
self.new_text = ""
```
```jinja
{# modules/todo/components/todo_list/template.html #}
-
{{ todo.text }}
{% for todo in items %}
{% endfor %}
Add
```
```jinja
{# any page template #}
{% extends "shared/base.html" %}
{% block body %}
{% live "todo_list" user_id=user.id %}
{% endblock %}
```
That's it. Click the checkbox — the server toggles the todo, sends an HTML patch back, the DOM updates without a page reload, and the dev wrote zero JavaScript.
## Documentation
Full docs, guides and live examples at **[hotframe.dev](https://hotframe.dev)**.
## License
Apache License 2.0 — see [LICENSE](LICENSE).