
Current Version: 5.4
View changelogpywebview is a lightweight BSD-licensed cross-platform wrapper around a webview component. pywebview 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. pywebview ships with a built-in HTTP server, DOM support in Python and window management functionality.,
Install
pip install pywebview
Depending on a platform you may need to install additional libraries. Refer to the installation page for details.
Hello world
import webview
webview.create_window('Hello world', 'https://pywebview.flowrl.com/')
webview.start()
Explore documentation or examples. If React is your thing, get started right away with React boilerplate.
Cross-platform
Compatible with Windows, macOS, Linux, and Android, ensuring a consistent user experience across all major operating systems.
Two-way Javascript↔Python communication
Facilitate direct communication between Javascript and Python without the need for HTTP or REST.
Built-in HTTP server
Easily serve static files with the integrated HTTP server, simplifying the process of hosting and accessing your web content.
Window management
Control the appearance and behavior of the window, including its size, position, and title. Manage multiple windows with ease.
Native components
Utilize native GUI elements such as menus, message boxes, and file dialogs to provide a seamless user interface.
DOM support
Leverage the Python API to manipulate and traverse DOM nodes without resorting to Javascript.
Enhanced filesystem support
Access the full path of dropped files, create save file and open file dialogs on demand.
Bundler friendly
Easily integrate with popular bundlers like pyinstaller, nuitka, and py2app, streamlining the packaging and distribution of your applications.