Skip to main content

Description

pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own dedicated window. It gives you richness of web technologies in your desktop application, all without a need to resort to an external browser. Combined with a lightweight web framework like [Flask](http://flask.pocoo.org/), [Bottle](http://bottlepy.org/docs/dev/index.html) or [web.py](http://webpy.org), you can create beautiful cross-platform HTML5 user interfaces targeting WebKit, while hiding the implementation details from the end user.

pywebview is lightweight with no dependencies on external GUI framwork. It uses native GUI for creating a web component window: Win32 on Windows, Cocoa on Mac OSX and Qt4/5 or GTK3 on Linux. If you decide to convert your application to an executable format, it does not bundle a heavy GUI toolkit with it, which keeps the size of the executable small. Python 2 and 3 compatible.

Dependencies

Windows

comtypes

OS X

pyobjc It comes bundled with the preinstalled Python. For Python 3 you have to install it separately.

Linux

For GTK3 based systems PyGObject

For QT based systems Either PyQt4 or PyQt5

Usage

import webview

webview.create_window(“It works, Jim!”, “http://www.flowrl.com”)

For more elaborated usage, refer to the examples in the examples folder

API

  • webview.create_window(title, url, width=800, height=600, resizable=True, fullscreen=False)

    Create a new WebView window. Calling this function will block execution, so you have to execute your program logic in a separate thread.

  • webview.load_url(url)

    Load a new URL into a previously created WebView window. This function must be invoked after WebView windows is created with create_window(). Otherwise an exception is thrown.

What web renderer is used?

For OS X and Linux systems you get WebKit. The actual version depends on the version of installed Safari on OS X and QT / GTK on Linux. Note that WebKit bundled with QT / GTK is slightly out of date comparing to the latest Safari or Chrome.

For Windows, you get, well, MSHTML (Trident) in all its glory. The version depends on the installed version of Internet Explorer. By default, when creating an embedded web component, MSHTML uses IE7 rendering mode. To overcome this feature, a registry setting is automatically modified to use the renderer of the latest installed version of Internet Explorer. Note that for Windows XP systems, you cannot get anything better than IE8. For Vista, you are limited to IE9.

Support for Chromium Embedded Framework (CEF) is planned for future versions.

Metadata

Release files for pywebview 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywebview 0.5
File Size Uploaded
pywebview-0.5.tar.gz 8.6 kB Details

Release files / pywebview-0.5.tar.gz

Download URL pywebview-0.5.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c1fff1c71d931ce7bb4e8f8051baa8d7b71044f5fde82c31b5ef7b1a52578ddc
BLAKE2b-256 checksum
How to use checksums
ca8e663b751e8600e95170a21cf0f92aacd4200d9ca12dc44971b26ea49a0adb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

6.2.1

2 release files

6.2

2 release files

6.1

2 release files

6.0

2 release files

5.4

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3

2 release files

5.2

2 release files

5.1

2 release files

5.0.5

2 release files

5.0.4

2 release files

5.0.3

2 release files

5.0.1

2 release files

5.0

1 release file

4.4.1

2 release files

4.4

2 release files

4.3.3

2 release files

4.3.2

2 release files

4.3.1

2 release files

4.3

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2

2 release files

4.1

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7

2 release files

3.6.3

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6

2 release files

3.5

1 release file

3.4

2 release files

3.3.5

2 release files

3.3.4

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3

2 release files

3.2

2 release files

3.1

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0

2 release files

2.4

2 release files

2.3

2 release files

2.2.1

2 release files

2.2

2 release files

2.1

2 release files

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0

1 release file

1.8

1 release file

1.7

1 release file

1.6

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2

1 release file

1.1

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

0.9

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

This release

0.5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page