Skip to content

Commit 5cb0ddd

Browse files
author
deeleeramone
committed
docs updates
1 parent 9a9fdf5 commit 5cb0ddd

1 file changed

Lines changed: 15 additions & 58 deletions

File tree

pywry/docs/docs/getting-started/why-pywry.md

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,15 @@
11
# Why PyWry
22

3-
PyWry is a rendering engine for building lightweight, cross-platform interfaces using web technologies (HTML, CSS, JavaScript) with Python. It is open source, Apache-licensed, and free for both commercial and personal use. In this document, we'll explain why companies and developers choose PyWry.
3+
PyWry is an open-source rendering engine for building lightweight, cross-platform interfaces using Python. It solves a specific problem: **how to build beautiful, modern data applications in Python without being forced into an opinionated web framework or a heavy native GUI toolkit.**
44

5-
We can split up the benefits of PyWry into two questions: First, why should you use web technologies to build your Python interfaces? Then, why should you choose PyWry as the framework to do so?
5+
PyWry renders standard HTML, CSS, and JavaScript inside battle-tested OS webviews (WebView2 on Windows, WebKit on macOS/Linux). Your team can use web skills they already have — no proprietary widget toolkit to learn. If it works in a browser, it works in PyWry.
66

7-
## Why choose web technologies
8-
9-
Modern applications are powered by web technologies - HTML, CSS, JavaScript, and WebAssembly. They are the dominant way to build user interfaces — both for consumer applications and mission-critical business tools. This is true for apps that run in a browser **and** for desktop applications that aren't accessed from a browser.
10-
11-
Most application framework SDKs make you choose between native or web-based. PyWry provides a unified Python API that services both. It runs directly inside any Python IDE, making it fast and easy to develop reusable components and layouts that are Pydantic objects.
12-
13-
PyWry is a full-stack rendering solution for Python that allows you to declaratively build interactive elements that automatically wire frontend <-> backend communication. No JavaScript required.
14-
15-
### Versatility
16-
17-
Web technologies are versatile. Your PyWry interface can include anything a web page can, or any custom HTML/CSS/JS you need. It bundles AgGrid and Plotly in the distributed wheel with pre-wired events and sensible defaults that allow you to render tables and charts with minimal effort - without any CDN delivery or other external libraries.
18-
19-
20-
### Reliability
21-
22-
Web rendering engines are among the most battle-tested software in the world. The OS webviews that PyWry uses (WebView2 on Windows, WebKit on macOS/Linux) ship with billions of devices and are maintained by Microsoft and Apple respectively.
23-
24-
### Interoperability
25-
26-
PyWry interfaces are built with standard web APIs. That means you can use any JavaScript library, any CSS framework, and any HTML pattern. If it works in a browser, it works in PyWry.
27-
28-
### Ubiquity
29-
30-
Web developers are everywhere. If your team needs to customize the frontend, they can use skills they already have. No proprietary widget toolkit to learn.
31-
32-
33-
## Why choose PyWry
34-
35-
There are many ways to render web content from Python — Electron-based apps, Dash, Streamlit, NiceGUI, Gradio, Flet, Jupyter widgets, or plain FastAPI servers. So why should you choose PyWry?
7+
There are many ways to render web content from Python — Electron, Dash, Streamlit, NiceGUI, Gradio, Flet, or plain FastAPI. So why choose PyWry?
368

379
### The "Goldilocks" Framework
3810

3911
Python developers often find themselves choosing between uncomfortable extremes:
12+
4013
- **Native GUI Toolkits (PyQt/Tkinter)**: Steep learning curves, custom styling systems, and they don't look modern without massive effort.
4114
- **Web-to-Desktop (Electron)**: Forces Python developers into the JavaScript/Node.js ecosystem and ships with hundreds of megabytes of Chromium bloat.
4215
- **Data Dashboards (Streamlit/Gradio)**: Excellent for rapid deployment in a browser, but highly opinionated, difficult to deeply customize, and hard to package as a true desktop executable.
@@ -49,59 +22,43 @@ PyWry's most potent feature is its **"Build Once, Render Anywhere"** pipeline. M
4922

5023
You can instantly render a Plotly chart or AgGrid table directly inside a **Jupyter Notebook** cell. When you're ready to share your work, you use the exact same code to deploy a browser-based FastAPI application. When you want to hand an internal tool to a business user, you use `pywry[freeze]` to compile that *same code* into a standalone `.exe` or `.app`—dropping the notebook or server entirely.
5124

52-
### Unrestricted Web Technologies
53-
54-
Unlike frameworks like Flet (which draws its own UI using the Flutter canvas), PyWry uses standard HTML, CSS, and JS rendered inside a local OS webview. This means you aren't restricted to a custom widget ecosystem. If you want to use Tailwind CSS, arbitrary JS libraries, or your company's internal React design system, PyWry acts as an invisible bridge.
55-
5625
### Lightweight Native Windows
5726

58-
PyWry uses the **OS-native webview** (WebView2, WebKit) instead of bundling a full browser engine. A PyWry app adds a few megabytes of overhead. An Electron app ships 150 MB+ of Chromium, and can't be used as a web application. Dash, Streamlit, and Panel require a running web server; they don't create native OS windows.
27+
PyWry uses the **OS-native webview** (WebView2, WebKit) via [PyTauri](https://github.com/pytauri/pytauri) instead of bundling a full browser engine like Electron. This results in apps that add only a few megabytes of overhead and open in under a second. There's no server to spin up and no browser to launch.
5928

6029
### One API, three targets
6130

62-
Write your interface once. PyWry automatically renders it in the right place:
31+
Write your interface once. PyWry automatically renders it in the right place without changing your code:
6332

6433
| Environment | Rendering Path |
6534
|---|---|
6635
| Desktop terminal | Native OS window via PyTauri |
6736
| Jupyter / VS Code / Colab | anywidget or inline IFrame |
6837
| Headless / SSH / Deploy | Browser tab via FastAPI + WebSocket |
6938

70-
You don't change your code. PyWry detects the environment and picks the right backend.
7139

7240
### Built for data workflows
7341

74-
PyWry isn't a general-purpose web framework. It's built specifically for Python data workflows:
75-
76-
- **Plotly charts** with pre-wired event callbacks (click, select, hover, zoom)
77-
- **AG Grid tables** with automatic DataFrame conversion and grid events
78-
- **Toolbar system** with 18 Pydantic input components across 7 layout positions
79-
- **Two-way events** between Python and JavaScript, with no boilerplate
80-
81-
The Toolbar system lets you build nested structures that wrap around your main content. You can easily add headers, footers, collapsible sidebars, marquees, and overlays - with no custom HTML or JS.
42+
PyWry comes with built-in integrations tailored for data workflows:
8243

83-
### Fast startup
44+
- **Plotly charts** with pre-wired event callbacks (click, select, hover, zoom).
45+
- **AG Grid tables** with automatic DataFrame conversion and grid events.
46+
- **Toolbar system** with 18 declarative Pydantic input components across 7 layout positions to easily add headers, sidebars, and overlays.
47+
- **Two-way events** between Python and JavaScript, with no boilerplate.
8448

85-
Native windows open in under a second. There's no server to spin up, no browser to launch, no bundle to compile. For notebook widgets, rendering is near-instant through anywidget.
8649

8750
### Production-ready
8851

89-
PyWry isn't just for prototyping and single-user applications:
52+
PyWry scales from prototyping to multi-user deployments:
9053

91-
- **Deploy Mode** with Redis backend for horizontal scaling and RBAC
92-
- **OAuth2** authentication system for both native and deploy modes
93-
- **Token authentication** and CSRF protection out of the box
94-
- **CSP headers** and security presets for production environments
95-
- **TOML-based configuration** with layered precedence (defaults → project → user → env vars)
54+
- **Deploy Mode** with an optional Redis backend for horizontal scaling.
55+
- **OAuth2** authentication system for both native and deploy modes with enterprise RBAC.
56+
- **Security built-in**: Token authentication, CSRF protection, and CSP headers out of the box.
9657

9758
### Cross-platform
9859

9960
PyWry runs on Windows, macOS, and Linux. The same code produces native windows on all three platforms, notebook widgets in any Jupyter environment, and browser-based interfaces anywhere Python runs.
10061

101-
### Mature foundation
102-
103-
PyWry is built on [Tauri](https://tauri.app/) via [PyTauri](https://github.com/pytauri/pytauri) — a mature Rust framework used by thousands of production applications. The webview layer, event system, and window management are battle-tested Rust code, not Python wrappers around fragile subprocess calls.
104-
10562

10663
## Why not something else
10764

0 commit comments

Comments
 (0)