3 ms·
This looks really neat! I'm just about to start a desktop application project, so I've found this at the perfect time. Is this production ready? I need to targ
by throwaway38375 3y ago
This looks really neat! I'm just about to start a desktop application project, so I've found this at the perfect time.
Is this production ready? I need to target Windows and MacOS with a high level of stability.
- kjksf 3y agoI would recommend wails (https://wails.io/ https://wails.io/) which is the same thing but for Go. 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).
- Thorrez 3y agoAre wails and pywebview bloaty? Do they bundle Chrome?
- jszymborski 3y agoYou can force it to use CEF, but otherwise uses what the OS/DE provides. https://pywebview.flowrl.com/guide/web_engine https://pywebview.flowrl.com/guide/web_engine
- kjksf 3y agoNo. They use whatever webview OS provides. 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).
- zitterbewegung 3y agoThere is a difference between speed and productivity and if you need to learn Go that can be a bigger problem than inefficiency. Also you should have a reason other that to change programming languages like this library versus walls like an actual speed test..:
- lolinder 3y ago> which I haven't used because I don't particularly want to learn Rust 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. [0] https://pyinstaller.org/en/stable/ https://pyinstaller.org/en/stable/
- simonw 3y agoBundling Python isn't too bad if you find the right tools for it. I really like https://github.com/indygreg/python-build-standalone https://github.com/indygreg/python-build-standalone and https://github.com/indygreg/PyOxidizer 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.
- ptx 3y ago> You'll have to bundle the whole of Python distro which is very bloaty. 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".
- hugs 3y agoIf you love Python, but envy the compiled-binary-ness of Go, you should check out Nim, and Nim bindings for Webview: https://github.com/neroist/webview 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.)
- kissaprofeetta 3y agoAuthor here. I have maintained pywebview for almost ten years, so yeah I would say it is production ready at this point :) New major version brings its own share of bugs, but most of those should have been ironed since 5.0