Build a desktop app with a web-based UI backed by Python logic, without shipping a bundled browser engine.
Wrap an existing web app into a native window with no browser chrome for distribution as a desktop tool.
Create a desktop tool where Python code and JavaScript in the page call each other directly.
Ship a cross-platform desktop app on Windows, macOS, Linux, and Android from a single Python codebase.
Install with pip, uses the OS built-in web renderer so no large browser engine is bundled.
pywebview is a Python library that lets you build desktop applications using web technologies: HTML, CSS, and JavaScript. Instead of learning a native GUI toolkit, you write your app's interface as a web page, and pywebview displays it in a real window on the user's screen. The window looks like a native app from the outside, with no visible browser chrome, address bar, or browser controls. Under the hood, pywebview uses each operating system's built-in web rendering component. On Windows it uses WinForms with the system web view, on macOS it uses Cocoa, and on Linux it uses either GTK or QT. Because it uses whatever the OS already provides, you do not have to bundle a large browser engine with your app, which keeps the download size small. Android is also supported. Beyond just displaying a web page, pywebview provides two-way communication between the Python side and the JavaScript running in the page. Python code can call JavaScript functions, and JavaScript in the page can call Python functions. The library also includes a built-in HTTP server, window management controls, and native UI elements like menus and file dialogs. Getting started is simple. Install it with pip, then write a few lines of Python to create a window pointing at an HTML file or a URL. A hello-world example that opens a window is three lines of code. Documentation, a gallery of examples, and a React starter template are all linked from the README. The project is actively maintained and accepts financial contributions through GitHub Sponsors, Patreon, and Open Collective. The original author also offers paid consulting services for projects that need deeper support.
← r0x0r on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.