pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own native GUI window. It gives you power of web technologies in your desktop application, hiding the fact that GUI is browser based. You can use pywebview either with a lightweight web framework like Flask or Bottle or on its own with a two way bridge between Python and DOM.
pywebview uses native GUI for creating a web component window: WinForms on Windows, Cocoa on macOS and QT or GTK on Linux. If you choose to freeze your application, pywebview does not bundle a heavy GUI toolkit or web renderer with it keeping the executable size small. pywebview is compatible with Python 3.
pywebview is created by Roman Sirokov.
pip install pywebview
On Linux you need additional libraries. Refer to the installation page for details.
import webview webview.create_window('Hello world', 'https://pywebview.flowrl.com/hello') webview.start()