Repolode
r0x0r

r0x0r/pywebview

Python library that wraps the native web view to show HTML, CSS and JavaScript in a desktop GUI window on Windows, macOS, Linux and Android.

Stars
6,120
Forks
643
Open issues
18
Last commit
19 hours ago

What is it?

pywebview is a lightweight wrapper around the native web view that displays HTML content in its own GUI window. It lets Python developers build desktop application interfaces with web technologies while the GUI itself is rendered by the platform's browser engine.

The library uses WinForms on Windows, Cocoa on macOS, and Qt or GTK on Linux to create the window. It includes a built-in HTTP server, two-way communication between JavaScript and Python, DOM access from Python, window management, an event system, and native elements such as application menus and dialogs. Because it relies on the system's own GUI toolkit and web renderer, it does not bundle them into frozen executables, which keeps their size small.

Installation is done with pip, and the project also supports Android.

Key features

  • 01Displays HTML, CSS and JavaScript content in a native desktop window.
  • 02Two-way communication between JavaScript and Python.
  • 03Built-in HTTP server and DOM manipulation from Python.
  • 04Window management, event handling, application menus and native dialogs.
  • 05Runs on Windows, macOS, Linux (GTK or Qt) and Android.

Use cases

  • Building a desktop GUI for a Python script or tool using a web-based frontend.
  • Wrapping an existing web app or React frontend into a standalone desktop application.
  • Creating small utilities where a lightweight executable size matters.

Quick start

  1. 1

    Install the library with pip

    pip install pywebview
  2. 2

    Create a file with the hello world example and run it

    import webview webview.create_window('Hello world', 'https://pywebview.flowrl.com/hello') webview.start()

Things to know

  • Some platforms may need additional system libraries, as described on the installation page.

Topics

FAQ

What is pywebview?
Python library that wraps the native web view to show HTML, CSS and JavaScript in a desktop GUI window on Windows, macOS, Linux and Android. pywebview is a lightweight wrapper around the native web view that displays HTML content in its own GUI window. It lets Python developers build desktop application interfaces with web technologies while the GUI itself is rendered by the platform's browser engine.
Is pywebview free to use? What license does it have?
pywebview is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
Is pywebview still maintained?
Actively maintained. The last commit to pywebview was on Oct 19, 2026.
What can I use pywebview for?
Building a desktop GUI for a Python script or tool using a web-based frontend. Wrapping an existing web app or React frontend into a standalone desktop application. Creating small utilities where a lightweight executable size matters.
How do I install pywebview?
Install the library with pip: pip install pywebview Create a file with the hello world example and run it: import webview webview.create_window('Hello world', 'https://pywebview.flowrl.com/hello') webview.start()
Where can I get pywebview?
The source code and installation instructions are on GitHub: https://github.com/r0x0r/pywebview

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects