violit 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,397 @@
1
+ Metadata-Version: 2.4
2
+ Name: violit
3
+ Version: 0.0.3
4
+ Summary: Violit: Faster than Light, Beautiful as Violet. The High-Performance Python Web Framework (Streamlit Alternative with Zero Rerun).
5
+ Author-email: Violit Team <violit.company@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/violit-dev/violit
8
+ Project-URL: Documentation, https://github.com/violit-dev/violit
9
+ Project-URL: Repository, https://github.com/violit-dev/violit
10
+ Project-URL: Issues, https://github.com/violit-dev/violit/issues
11
+ Keywords: web,framework,streamlit,dashboard,ui,fastapi,reactive,zero-rerun,shoelace,websocket,data-science
12
+ Classifier: Development Status :: 2 - Pre-Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
22
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
23
+ Classifier: Topic :: Software Development :: User Interfaces
24
+ Classifier: Framework :: FastAPI
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: fastapi>=0.68.0
29
+ Requires-Dist: uvicorn>=0.15.0
30
+ Requires-Dist: python-multipart>=0.0.5
31
+ Requires-Dist: pywebview>=4.0.0
32
+ Requires-Dist: cachetools>=4.2.0
33
+ Requires-Dist: pandas>=1.3.0
34
+ Requires-Dist: numpy>=1.20.0
35
+ Requires-Dist: plotly>=5.0.0
36
+ Requires-Dist: matplotlib>=3.4.0
37
+ Requires-Dist: jinja2>=3.0.0
38
+ Requires-Dist: websockets>=10.0
39
+ Requires-Dist: bcrypt>=4.0.0
40
+ Dynamic: license-file
41
+
42
+ <p align="center">
43
+ <img src="./assets/violit_glare_small.png" alt="Violit™ Logo" width=80%>
44
+ </p>
45
+
46
+
47
+ # 💜 Violit
48
+
49
+ > **"Faster than Light, Beautiful as Violet."**
50
+ > **Structure of Streamlit × Performance of React**
51
+
52
+ **Violit** is a next-generation Python web framework that adopts an **O(1) State Architecture** for instant reactivity, unlike Streamlit's **Full Script Rerun** structure.
53
+
54
+ Build applications that react at the speed of light with the most elegant syntax.
55
+
56
+ <p align="center">
57
+ <img src="https://img.shields.io/pypi/v/violit?color=blueviolet&style=flat-square&ignore=cache" alt="PyPI">
58
+ <img src="https://img.shields.io/badge/Python-3.10+-blue.svg?style=flat-square" alt="Python 3.10+">
59
+ <img src="https://img.shields.io/badge/License-MIT-green.svg?style=flat-square" alt="MIT License">
60
+ <img src="https://img.shields.io/badge/Framework-FastAPI-009688.svg?style=flat-square" alt="FastAPI">
61
+ <img src="https://img.shields.io/badge/UI-Shoelace-7C4DFF.svg?style=flat-square" alt="Shoelace">
62
+ </p>
63
+
64
+ ---
65
+
66
+ ## 📸 Demo
67
+
68
+ *A dashboard built with Violit running in real-time.*
69
+
70
+ <p align="center">
71
+ <img src="./assets/demo_show_main_small.gif" alt="Violit Showcase Demo" width=60%>
72
+ </p>
73
+
74
+
75
+ ---
76
+
77
+ ## ⚡ Why Violit?
78
+
79
+ ### Architectural Differences
80
+
81
+ Violit and Streamlit are similar in that they build UIs with Python code, but their internal mechanisms are fundamentally different.
82
+
83
+ | Feature | Streamlit (Traditional) | **Violit (Reactive)** |
84
+ | --- | --- | --- |
85
+ | **Execution Model** | **Full Rerun (O(N))**<br>Reruns the entire script on every user interaction. | **Zero Rerun (O(1))**<br>Updates only the components connected to the modified State. |
86
+ | **Performance** | Response speed may degrade as data size increases. | Maintains consistent reactivity regardless of data scale. |
87
+ | **Optimization** | Requires optimization decorators like `@cache`, `@fragment`. | Optimized by design without extra optimization code. |
88
+ | **Deployment** | Optimized for web browser execution. | Supports both Web Browser and **Desktop Native App** modes. |
89
+ | **Design** | Focuses on providing basic UI. | Provides ready-to-use designs with **30+ professional themes**. |
90
+
91
+ ### Key Features
92
+
93
+ 1. **Optimization by Design (Streamlit-Like Syntax, No Complexity)**:
94
+ Streamlit's intuitive syntax is maintained, but complex optimization tools are removed at the architecture level.
95
+ * ❌ **No `@cache_data`, `@fragment`, `st.rerun`**: Thanks to the O(1) structure, manual optimization is unnecessary.
96
+ * ❌ **No `key` Management**: No need to manually specify unique keys for widget state management.
97
+ * ❌ **No Complex Callbacks**: No need to define complex callbacks/classes like Dash or Panel.
98
+
99
+ 2. **Ultra-Fast Speed**: Even if you move the slider in 0.1s increments, the chart reacts in real-time without stuttering.
100
+
101
+ 3. **Hybrid Runtime**:
102
+ * **WebSocket Mode**: Ultra-low latency bidirectional communication (Default)
103
+ * **Lite Mode**: HTTP-based, advantageous for handling large-scale concurrent connections
104
+
105
+ 4. **Desktop Mode**: Can run as a perfect desktop application without Electron using the `--native` option.
106
+
107
+ ---
108
+
109
+ ## 🎨 Theme Gallery
110
+
111
+ You don't need to know CSS at all. Violit provides over 30 themes. (Soon, users will be able to easily add Custom Themes.)
112
+
113
+ *Theme demo will be updated soon.*
114
+
115
+ ![Theme Gallery Grid](PLACEHOLDER_FOR_THEME_GALLERY_GRID)
116
+
117
+ ```python
118
+ # Configuration at initialization
119
+ app = vl.App(theme='cyberpunk')
120
+
121
+ # Runtime change
122
+ app.set_theme('ocean')
123
+ ```
124
+
125
+ | Theme Family | Examples |
126
+ | --- | --- |
127
+ | **Dark 🌑** | `dark`, `dracula`, `monokai`, `ocean`, `forest`, `sunset` |
128
+ | **Light ☀️** | `light`, `pastel`, `retro`, `nord`, `soft_neu` |
129
+ | **Tech 🤖** | `cyberpunk`, `terminal`, `cyber_hud`, `blueprint` |
130
+ | **Professional 💼** | `editorial`, `bootstrap`, `ant`, `material`, `lg_innotek` |
131
+
132
+ ---
133
+
134
+ ## 📈 Benchmarks & Performance
135
+
136
+ Benchmark results showing how efficient Violit's O(1) update method is compared to the existing O(N) method.
137
+
138
+
139
+
140
+ *Detailed benchmark data will be updated soon.*
141
+
142
+ ![Benchmark Chart](PLACEHOLDER_FOR_BENCHMARK_CHART)
143
+
144
+
145
+ ---
146
+
147
+ ## 🚀 Comparison
148
+
149
+ ### Python UI Frameworks
150
+
151
+ | Framework | Architecture | Learning Curve | Performance | Desktop App | Real-time |
152
+ |-----------|---------|----------|---------|------------|------------|
153
+ | **Streamlit** | Full Rerun | Very Easy | Slow | ❌ | △ |
154
+ | **Dash** | Callback | Medium | Fast | ❌ | △ |
155
+ | **Panel** | Param | Hard | Fast | ❌ | ✅ |
156
+ | **Reflex** | React (Compile) | Hard | Fast | ❌ | ✅ |
157
+ | **NiceGUI** | Vue | Easy | Fast | ✅ | ✅ |
158
+ | **Violit** | **Signal** | **Very Easy** | **Fast** | **✅** | **✅** |
159
+
160
+ ### Code Comparison
161
+
162
+ #### **1. vs Streamlit** (Rerun vs Signal)
163
+ *Streamlit re-executes the **entire script** on button click, but Violit executes only **that function**.*
164
+
165
+ ```python
166
+ # Streamlit
167
+ import streamlit as st
168
+
169
+ if "count" not in st.session_state:
170
+ st.session_state.count = 0
171
+
172
+ if st.button("Click"):
173
+ st.session_state.count += 1 # Rerun triggers here
174
+
175
+ st.write(st.session_state.count)
176
+ ```
177
+
178
+ ```python
179
+ # Violit
180
+ import violit as vl
181
+ app = vl.App()
182
+
183
+ count = app.state(0)
184
+
185
+ # Update only count on click (No Rerun)
186
+ app.button("Click", on_click=lambda: count.set(count.value + 1))
187
+ app.write(count)
188
+ ```
189
+
190
+ #### **2. vs Dash** (Callback Hell vs Auto-Reactivity)
191
+ *Dash requires complex **Callbacks** connecting Input/Output, but Violit only needs a single **State**.*
192
+
193
+ ```python
194
+ # Dash
195
+ from dash import Dash, html, Input, Output, callback
196
+
197
+ app = Dash(__name__)
198
+ app.layout = html.Div([
199
+ html.Button("Click", id="btn"),
200
+ html.Div(id="out")
201
+ ])
202
+
203
+ @callback(Output("out", "children"), Input("btn", "n_clicks"))
204
+ def update(n):
205
+ return f"Value: {n}" if n else "Value: 0"
206
+ ```
207
+
208
+ ```python
209
+ # Violit
210
+ count = app.state(0)
211
+
212
+ app.button("Click", on_click=lambda: count.set(count.value + 1))
213
+ # Automatic state dependency tracking -> No Callback needed
214
+ app.write(lambda: f"Value: {count.value}")
215
+ ```
216
+
217
+ #### **3. vs NiceGUI** (Binding vs Direct State)
218
+ *NiceGUI is also great, but Violit offers a **more concise syntax** in the style of Streamlit.*
219
+
220
+ ```python
221
+ # NiceGUI
222
+ from nicegui import ui
223
+
224
+ count = {'val': 0}
225
+ ui.button('Click', on_click=lambda: count.update(val=count['val'] + 1))
226
+ ui.label().bind_text_from(count, 'val', backward=lambda x: f'Value: {x}')
227
+ ```
228
+
229
+ ```python
230
+ # Violit
231
+ count = app.state(0)
232
+ app.button('Click', on_click=lambda: count.set(count.value + 1))
233
+ app.write(count) # No need for complex connections like .bind_text
234
+ ```
235
+
236
+ #### **4. vs Reflex** (Class & Compile vs Pure Python)
237
+ *Reflex requires State **class definition** and **compilation**, but Violit is a **pure Python** script.*
238
+
239
+ ```python
240
+ # Reflex
241
+ import reflex as rx
242
+
243
+ class State(rx.State):
244
+ count: int = 0
245
+ def increment(self):
246
+ self.count += 1
247
+
248
+ def index():
249
+ return rx.vstack(
250
+ rx.button("Click", on_click=State.increment),
251
+ rx.text(State.count)
252
+ )
253
+ ```
254
+
255
+ ```python
256
+ # Violit
257
+ # No class definition needed, no compilation needed
258
+ count = app.state(0)
259
+ app.button("Click", on_click=lambda: count.set(count.value + 1))
260
+ app.write(count)
261
+ ```
262
+
263
+ ---
264
+
265
+ ## 🚀 Quick Start
266
+
267
+ ### 1. Installation
268
+
269
+ Can be installed in Python 3.10+ environments.
270
+
271
+ ```bash
272
+ pip install violit
273
+
274
+ # Or development version
275
+ pip install git+https://github.com/violit-dev/violit.git
276
+ ```
277
+
278
+
279
+ ### 2. Hello, Violit!
280
+
281
+ Create a `hello.py` file.
282
+
283
+ ```python
284
+ import violit as vl
285
+
286
+ app = vl.App(title="Hello Violit", theme='ocean')
287
+
288
+ app.title("💜 Hello, Violit!")
289
+ app.markdown("Experience the speed of **Zero Rerun**.")
290
+
291
+ count = app.state(0)
292
+
293
+ col1, col2 = app.columns(2)
294
+ with col1:
295
+ app.button("➕ Plus", on_click=lambda: count.set(count.value + 1))
296
+ with col2:
297
+ app.button("➖ Minus", on_click=lambda: count.set(count.value - 1))
298
+
299
+ app.metric("Current Count", count)
300
+
301
+ app.run()
302
+ ```
303
+
304
+ ### 3. Execution
305
+
306
+ ```bash
307
+ # Basic run (WebSocket Mode)
308
+ python hello.py
309
+
310
+ # Desktop App Mode (Recommended)
311
+ python hello.py --native
312
+
313
+ # Port configuration
314
+ python hello.py --port 8020
315
+ ```
316
+
317
+ ---
318
+
319
+ ## 📚 Widget Support
320
+
321
+ Violit supports core Streamlit widgets, and some features have been redesigned for greater efficiency.
322
+
323
+ For a detailed compatibility list and information on unsupported widgets, please refer to the [Streamlit API Support Matrix](./doc/Streamlit%20API%20Support%20Matrix.md) document.
324
+
325
+ ---
326
+
327
+ ## 🛠️ Tech Stack
328
+
329
+ * **Backend**: FastAPI (Async Python)
330
+ * **Frontend**: Web Components (Shoelace), Plotly.js, AG-Grid
331
+ * **Protocol**: WebSocket & HTTP/HTMX Hybrid
332
+ * **State**: Signal-based Reactivity
333
+
334
+ ---
335
+
336
+ ## 🗺️ Roadmap
337
+
338
+ Violit is continuously evolving.
339
+
340
+ * ✅ **Core**: Signal State Engine, Theme System
341
+ * ✅ **Widgets**: Plotly, Dataframe, Input Widgets
342
+ * ⏳ **Homepage**: Official Homepage Open
343
+ * ⏳ **Documentation**: Official Technical Documentation and API Reference Update
344
+ * ⏳ **Custom Components**: User-defined Custom Component Support
345
+ * ⏳ **Custom Theme**: User-defined Custom Theme Support
346
+ * ⏳ **async**: Async processing support
347
+ * ⏳ **More examples**: Provide more real-world usable example code
348
+ * ⏳ **Violit.Cloud**: Cloud deployment service
349
+ * ⏳ **Expansion**: Integration of more third-party libraries
350
+
351
+ ---
352
+
353
+ ## 📂 Project Structure
354
+
355
+ ```bash
356
+ .
357
+ ├── violit/ # Framework source code
358
+ │ ├── app.py # Main App class and entry point
359
+ │ ├── broadcast.py # Real-time WebSocket broadcasting
360
+ │ ├── state.py # Reactive State Engine
361
+ │ ├── theme.py # Theme management
362
+ │ ├── assets/ # Built-in static files
363
+ │ └── widgets/ # Widget implementations
364
+ │ ├── input_widgets.py
365
+ │ ├── data_widgets.py
366
+ │ ├── layout_widgets.py
367
+ │ └── ...
368
+ └── requirements.txt # Dependency list
369
+ ```
370
+
371
+ ---
372
+
373
+ ## 🤝 Contributing
374
+
375
+ **Violit** is an open-source project. Let's build the future of faster and more beautiful Python UIs together.
376
+
377
+ 1. Fork this repository
378
+ 2. Create your feature branch
379
+ 3. Commit your changes
380
+ 4. Push to the branch
381
+ 5. Open a Pull Request
382
+
383
+ ---
384
+
385
+ ## 📝 License
386
+
387
+ MIT License
388
+
389
+ **Violit™ is a trademark of The Violit Team.**
390
+
391
+ ---
392
+
393
+ <p align="center">
394
+ <strong>Made with 💜 by the Violit Team</strong>
395
+ <br>
396
+ <em>Faster than Light, Beautiful as Violet.</em>
397
+ </p>
@@ -1,16 +1,16 @@
1
1
  violit/__init__.py,sha256=mD8FeVW-LQ8yLpW2Unc-K885T507BgRfSI7mmObpPK0,88
2
- violit/app.py,sha256=ZId09ksikFNYO54-l88bQF2Q5WxkB-QmG9rWxIvdpY4,88313
2
+ violit/app.py,sha256=B9lF_3RNxJeT1ROAiGFgHLL09oLRW8Qt3gCY67Vlhwo,89183
3
3
  violit/broadcast.py,sha256=IIRQR15Wr7cqHh0nSH86QdWN_Wd_GHNfVrtWCATGElc,24293
4
4
  violit/broadcast_primitives.py,sha256=G4Nx9BZscidPAjUc9janwIJ0zUi6DAnNFeJS67Uvs9I,5739
5
5
  violit/component.py,sha256=zH-ln8CVrkqfgB-_SPUmCL8dqQv-8RbKb2p9gtYqlqI,1445
6
6
  violit/context.py,sha256=EoshSMZ1kwHp81LU1kjUJXr4PJkFauTLwDcVwTZAxwk,443
7
- violit/engine.py,sha256=R-L09Y3u7_cjcX0xOEfhrUUm69kBL1Dl7bnnaPww6tw,1330
7
+ violit/engine.py,sha256=oH3C04vhVgZFgy0HSaI9vPOkBEZBQBz40zs1Y1my9vw,1829
8
8
  violit/state.py,sha256=qBHZPv00OqopISBH5TN8GJBKZoT8klBX0S0P1FWF_kQ,2487
9
9
  violit/theme.py,sha256=1Ht2DariRADxGU1GTtUFJaIXZXi9XuhnucT2d04cwhs,30781
10
10
  violit/widgets/__init__.py,sha256=YiIqTOmGMWmmHmnZhfC9o0ZIYgjGqKrgAW2f87DiTP8,847
11
11
  violit/widgets/card_widgets.py,sha256=U-5iArs5eFxnzH6sh7YlF_5GHdwnIPhujJfdojBeViU,22517
12
12
  violit/widgets/chart_widgets.py,sha256=swFvpfQ4A6ObXcBs90Pe5pIlIUzsZ4x97veWsMR4UFs,10428
13
- violit/widgets/chat_widgets.py,sha256=uBViFy3aOIQ7IuffJvIunjf5uly13Cx4_6UlZrIbguA,10850
13
+ violit/widgets/chat_widgets.py,sha256=YHNY4SDqHJhTi3Lq_5lGl01y9jsJAfbPlH4Ar0UqYC8,10899
14
14
  violit/widgets/data_widgets.py,sha256=p1TdhPYtvukZkQ8Z2nOBw8hLoNrpqx3Bj5iexhpl4Ok,22183
15
15
  violit/widgets/form_widgets.py,sha256=QVj-MRVpYzIM3hE8ISS5xZcX3jlTTzjRYSdzhw-K5OY,18327
16
16
  violit/widgets/input_widgets.py,sha256=tiLpfaKBwGhE2CdOL9s950bLVz2WhMP4Y-1yRM0qIAY,32023
@@ -19,8 +19,8 @@ violit/widgets/list_widgets.py,sha256=2-FWluNGfdBBN24ZyHOC2a8O93-NzGYHZlVYARX4Fp
19
19
  violit/widgets/media_widgets.py,sha256=FIMjaE1CIfqnsdMHbbCromjwxoWPfvFKmL0_qd6nDL4,7386
20
20
  violit/widgets/status_widgets.py,sha256=HXfS2F_PhEnwHrKNEMFv9JTgmeXgpfspoqq_jJZRPEQ,11140
21
21
  violit/widgets/text_widgets.py,sha256=xL0pqpQnt5M-BJJ0dzcaPqk6FizwN6HRAR2uOVN0zOw,17009
22
- violit-0.0.2.dist-info/licenses/LICENSE,sha256=tOk4v2bF2ohXIQ0ESylY80St38iDOWp5p5WKW2tUAP8,1088
23
- violit-0.0.2.dist-info/METADATA,sha256=Z8vRdPEvFh6FK10C8HJOJxeVjRo2l5I0af7laPD21X0,18874
24
- violit-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- violit-0.0.2.dist-info/top_level.txt,sha256=VormCSpHvTyMyZQ17MwgiPegDJev8HQCN5HUUcxUcE0,7
26
- violit-0.0.2.dist-info/RECORD,,
22
+ violit-0.0.3.dist-info/licenses/LICENSE,sha256=dMxDVLF-GU5ZhQ-GmpL_eY4j7Wn1c4CtmRU8cOnR7Hw,1093
23
+ violit-0.0.3.dist-info/METADATA,sha256=sOpdfpLINVVSkcPujhqZ_UkUztK77xhVb_hNM6YtmAE,12465
24
+ violit-0.0.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
25
+ violit-0.0.3.dist-info/top_level.txt,sha256=VormCSpHvTyMyZQ17MwgiPegDJev8HQCN5HUUcxUcE0,7
26
+ violit-0.0.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 violit-dev
3
+ Copyright (c) 2026 The Violit Team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal