Is this production ready? I need to target Windows and MacOS with a high level of stability.
Is this production ready? I need to target Windows and MacOS with a high level of stability.
Nothing against this project it's just Python is not an optimal technology for shipping self-contained desktop apps.
You'll have to bundle the whole of Python distro which is very bloaty.
A Go will compile to a statically linked executable that only contains the code actually used in the app. Still not tiny but probably 10x smaller than packaged Python app.
And I used wails so can vouch that it works.
There's also an option for Rust (which I haven't used because I don't particularly want to learn Rust).
On Windows it's webview that is Edge (based on Chrome).
On Mac it's webview based on Safari.
They re-use the executable that is already installed in the OS.
They don't provide all the features that Electron does but you can do anything that a modern browser can do + add OS specific things with backend code (written in Go or Python or Rust, depending on which project you use).
This is a good reason to not recommend libraries for other languages as a substitute. People are interested in pywebview because it's written for Python. They don't want to learn Go any more than you want to learn Rust.
> Nothing against this project it's just Python is not an optimal technology for shipping self-contained desktop apps.
"Optimal" is relative, and varies depending on a lot of factors that you don't have context for for OP's project. Even setting aside the value of being able to use a language you already know (which is hard to overstate), there are reasons you might want to use Python over Go.
For example: the last desktop app that I started integrates with a bunch of ML/LLM libraries that are, unsurprisingly, primarily written in and for Python. I could use Go and dive into FFI/IPC for the Python code, or I can just write the whole thing in Python and pywebview and figure out distribution [0]. I chose the latter.
I really like https://github.com/indygreg/python-build-standalone and https://github.com/indygreg/PyOxidizer
A bundled, built standalone Python can be 16 to 32MB (including the full standard library, which you can strip down to just the bits you use to save size). Not tiny, but probably not worth switching programming languages over.
Python's embeddable package (for 64-bit Windows, available on the download page) is 23 MB uncompressed or 10.5 MB zipped. Although I'm sure Go can create smaller apps, I wouldn't call it "very bloaty".
https://github.com/neroist/webview
(Obviously, Nim is not Python, but I like it. It does feel like a compiled, fast Python. And no disrespect to Pywebview, it's great, too.)