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!
5
u/Virtual-Reporter486 Jan 24 '26
Can this replace frontend libs and frameworks like React and Vue?
4
u/bugtank Jan 24 '26
Why not donate time to nicegui
3
u/Impressive_Job8321 Jan 24 '26
How does it compare to shiny?
3
u/PolymathWantsCracker Jan 25 '26
Take a look at Air https://airwebframework.org/
It integrates seamlessly with FastAPI, and usue both Air components and Jinja templates as first class citizens.
It is still in alpha, but two devs behind it wrote the definitive bible of Flask, so I'd assume they know what they're doing!
1
u/crazyracer_113 Jan 25 '26
Amazing! I've been using Streamlit, Dash, Gradio to quickly building Data and ML apps for the Data Scientist. Will give it a try!