keep-loving-pythonのブログ

Pythonを愛し続けたいです(Pythonが流行っている限りですが。。。)

pywebview。 pythonでアプリが!!!これは、かなり、注目すべきでは!

pywebview とは

github.com

pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own native GUI window. It gives you the power of web technologies in your desktop application, hiding the fact that the GUI is browser based. Available for Windows, macOS, Linux and Android. You can use pywebview either with a 3rd party web framework or on its own with a two way bridge between Python and DOM.

pywebview uses native GUI for creating a web component window: WinForms on Windows, Cocoa on macOS, QT or GTK on Linux and Kivy for Android. If you choose to freeze your application, pywebview does not bundle a heavy GUI toolkit or web renderer with it, keeping the executable size small. pywebview is compatible with Python 3.

pywebview is created by Roman Sirokov.

ChatGPT訳:

pywebviewは、HTMLコンテンツを独自のネイティブGUIウィンドウ内で表示することを可能にする、軽量でクロスプラットフォームなWebViewコンポーネントのラッパーです。これにより、デスクトップアプリケーションでWeb技術の力を活用でき、GUIがブラウザベースであることを隠します。WindowsmacOSLinuxAndroidで利用可能です。pywebviewは、サードパーティのWebフレームワークと一緒に使用することも、PythonとDOM間の双方向ブリッジを用いて独自に使用することもできます。

pywebviewは、ネイティブGUIを使用してWebコンポーネントウィンドウを作成します。WindowsではWinForms、macOSではCocoaLinuxではQTまたはGTKAndroidではKivyを使用します。アプリケーションをフリーズすることを選択した場合、pywebviewは重いGUIツールキットやWebレンダラーを同梱せず、実行ファイルのサイズを小さく保ちます。pywebviewはPython 3と互換性があります。

pywebviewは、Roman Sirokovによって作成されました。

サンプル

https://github.com/r0x0r/pywebview/blob/master/examples/js_api.py

↑ 悪くない!