skillfed

pywebview

Build GUI for your Python program with JavaScript, HTML, and CSS

pywebview v6.2.1 1.7M downloads/30d#3,657 on PyPI5,981
Permissive license BSD 3-Clause License Copyright (c) 2014-2017, Roman Sirokov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the… (full text in the JSON record) Active released

What it is and what it does

pywebview is a lightweight wrapper around native webview components that lets you build desktop GUI applications using HTML, CSS, and JavaScript while keeping the logic in Python. It uses the platform's native rendering engine—WinForms on Windows, Cocoa on macOS, and Qt or GTK on Linux—so you don't bundle a separate browser engine, keeping executable size small. The package includes a built-in HTTP server for serving your UI, two-way communication between Python and JavaScript, DOM support, and native window management (menus, dialogs, window control).

It's designed for developers who want to leverage web technologies for UI but keep their application logic in Python. You write your interface in HTML/CSS/JavaScript and call Python functions from the frontend, or update the DOM from Python. The framework handles the platform-specific details, so the same code runs on Windows, macOS, and Linux with native look and feel.

Use it for:

  • Build a cross-platform desktop application with a web-based UI without bundling a heavy GUI toolkit.
  • Create a Python tool with an HTML/CSS interface for configuration, monitoring, or data visualization.
  • Develop a native-looking desktop app that reuses existing web components or React code.
  • Wrap a Python backend service with a lightweight GUI that communicates via Python-JavaScript bridge.
  • Prototype or ship a desktop application quickly using familiar web technologies while keeping the executable small.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pywebview wraps native webview components to display HTML/CSS/JavaScript content in desktop GUI windows, with built-in HTTP server, Python-JavaScript communication, and native window controls.

Yes, if you want to build a cross-platform desktop GUI in Python using web technologies without heavy toolkit overhead. The package is actively maintained, has no known vulnerabilities, and uses a permissive BSD license. Install friction is low, though you may need platform-specific system libraries. It's well-suited for developers comfortable with both Python and web technologies.

Install

pywebview on PyPI

pip

pip install pywebview

uv

uv add pywebview

poetry

poetry add pywebview

Installing pywebview

Before you install

Low install friction; ships as a pure-Python wheel. Runtime dependencies are platform-specific (pythonnet on Windows, pyobjc frameworks on macOS, QtPy on Linux), so actual installation may require system libraries—check the installation guide for your platform.

License in practice

BSD 3-Clause License permits commercial and private use with minimal restrictions; you may use, modify, and distribute pywebview provided you retain the copyright notice and disclaimer.

Quickstart

pip install pywebview

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

Platform-specific system libraries may be required (e.g., GTK/Qt development headers on Linux); see installation guide. Requires Python >=3.8.

Verify before relying

  • Whether the built-in HTTP server is suitable for production use or intended only for development.
  • Performance characteristics and memory footprint compared to other desktop webview frameworks.
  • Specific DOM manipulation capabilities and their scope beyond the examples shown.

Package facts

License BSD 3-Clause License Copyright (c) 2014-2017, Roman Sirokov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 12 — pythonnet, pyobjc-core, pyobjc-framework-Cocoa, pyobjc-framework-Quartz, pyobjc-framework-WebKit, pyobjc-framework-security, pyobjc-framework-UniformTypeIdentifiers, QtPy, importlib_resources, proxy_tools, bottle, typing_extensions
Maintenance actively maintained — 121 days since the last release
Last repo commit
First released
Downloads 1,680,813/month — #3,657 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pywebview-6.2.1-py3-none-any.whl

Keywords: gui, webkit, html, web

Environment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 Applications :: GTKEnvironment :: X11 Applications :: QtIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: User Interfaces

Tags

desktop GUI with HTML and JavaScriptnative webview wrapper Pythonbuild desktop app with web technologiesPython GUI using browser renderingcross-platform desktop application frameworkHTML CSS JavaScript desktop windowPython to JavaScript bridge
desktop-guicross-platformwebview

More Python Modules packages