r/FastAPI • u/Puzzleheaded_Clerk68 • Jan 24 '26
pip package I built "Violit": A High-Performance UI Framework powered by FastAPI & Signals (O(1) reactivity without reruns)
Hi everyone,
I’m a huge fan of the FastAPI ecosystem. While I love FastAPI for its performance, I’ve always struggled to find a Python UI framework that matches its "async-first" speed without the developer friction.
Streamlit is great for prototyping, but the "full script rerun" on every interaction is a performance bottleneck. So, I built Violit. It’s an open-source framework that uses FastAPI as the core engine to deliver a Streamlit-like DX but with O(1) signal-based reactivity.
Demo

Why FastAPI?
I chose FastAPI because I wanted Violit to be production-ready and async-native from day one.
- State over WebSockets: Violit maintains a persistent connection via FastAPI’s WebSocket implementation. When a state (Signal) changes, only the specific component updates—no page refreshes or full script reruns.
- Async-First: Since it’s built on FastAPI, it handles asynchronous tasks (like AI inference or DB queries) without blocking the UI. (This feature will be updated soon.)
- High Throughput: By leveraging Uvicorn/Starlette under the hood, it scales far better than traditional "rerun-based" frameworks.
Key Features
- Zero Rerun Architecture: Pure O(1) state updates.
- 90% Streamlit Compatibility: If you know Streamlit, you already know Violit.
- Shoelace Web Components: Modern, accessible UI elements.
- 30+ Built-in Themes: Switch from "Cyberpunk" to "Dracula" with one line:
app.theme('dracula'). - Native Mode: Package your FastAPI-based web app into a desktop app with
--native.
Simple Example
import violit as vl
app = vl.App()
count = app.state(0) # Reactive Signal
# No full script rerun!
# FastAPI handles the WebSocket message and updates only the label.
app.button("Increment", on_click=lambda: count.set(count.value + 1))
app.write("Current Count:", count)
app.run()Feedback Wanted!
As a fellow FastAPI user, I’d love to hear your thoughts on the architecture. Is there anything you'd like to see in a "FastAPI-based frontend" framework?
- Repo: https://github.com/violit-dev/violit
- PyPI:
pip install violit Example:
I’m currently in early Alpha (v0.0.2) and looking for contributors and feedback to make Python web development even faster!
View all comments
4
u/bugtank Jan 24 '26
Why not donate time to nicegui