HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
r0x0r
pywebview
Python2020–2025
r0x0r / pywebview

pywebview

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

11Distinct people
11Mentions
0Explicit recommenders
6.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:04:58 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2020-04-26 12:57:18 UTC to 2025-12-17 18:23:33 UTC.

01232020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC211

What Hacker News says

3 sources
# webview_python A lightweight Python binding for creating native GUI applications using web technologies. Uses WebView2 on Windows and native webview implementations on other platforms. ## Features - Cross-platform support: - Windows: Microsoft Edge WebView2 engine - macOS: WebKit - Linux: GTK-based WebKit - Simple and intuitive Python API - High performance with minimal resource usage - Two-way JavaScript bridge - Easy installation with minimal dependencies ## Why Another Binding? Existing Python WebView solutions have limitations: - [webview-python](https://github.com/zserge/webview-python) - Hasn't been updated in 6 years, compilation issues, doesn't use WebView2 - [pywebview](https://github.com/r0x0r/pywebview) - Complex setup and installation issues ## Installation ```bash pip install webview_python ``` ## Usage ### Displ
Read the rest
ay Inline HTML ```python from webview.webview import Webview from urllib.parse import quote html = """ <html> <body> <h1>Hello from Python Webview!</h1> </body> </html> """ webview = Webview() webview.navigate(f"data:text/html,{quote(html)}") webview.run() ``` ### Load Local HTML File ```python from webview.webview import Webview import os webview = Webview() current_dir = os.path.dirname(os.path.abspath(__file__)) html_path = os.path.join(current_dir, 'local.html') webview.navigate(f"file://{html_path}") webview.run() ``` ### Load Remote URL ```python from webview.webview import Webview webview = Webview() webview.navigate("https://www.python.org") webview.run() ``` ### Python-JavaScript Bindings ```python from webview.webview import Webview, Size, SizeHint from urllib.parse import quote webview = Webview(debug=True) # Python functions that can be called from JavaScript def hello(): webview.eval("updateFromPython('Hello from Python!')") return "Hello from Python!" def add(a, b): return a + b # Bind Python functions webview.bind("hello", hello) webview.bind("add", add) # Configure window webview.title = "Python-JavaScript Binding Demo" webview.size = Size(640, 480, SizeHint.FIXED) # Load HTML with JavaScript html = """ <html> <head> <title>Python-JavaScript Binding Demo</title> <script> async function callPython() { const result = await hello(); document.getElementById('result').innerHTML = result; } async function callPythonWithArgs() { const result = await add(40, 2); document.getElementById('result').innerHTML = `Result: ${result}`; } function updateFromPython(message) { document.getElementById('result').innerHTML = `Python says: ${message}`; } </script> </head> <body> <h1>Python-JavaScript Binding Demo</h1> <button onclick="callPython()">Call Python</button> <button onclick="callPythonWithArgs()">Call Python with Args</button> <div id="result"></div> </body> </html> """ webview.navigate(f"data:text/html,{quote(html)}") webview.run() ``` ## API Overview - `Webview()`: Create a webview instance - `webview.navigate(url)`: Navigate to URL or load HTML content - `webview.bind(name, func)`: Bind Python function to JavaScript - `webview.eval(js_code)`: Execute JavaScript code - `webview.run()`: Start the webview main loop - `Size(width, height, hint)`: Configure window size - `SizeHint`: Window size hint constants ## Contributing Contributions are welcome! Please feel free to submit issues and pull requests.
In Show HN: A new webview binding for Python call 4 test

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.