Skip to main content

超简单的pywebview UI库 支持py和js的相互通信 支持文件拖拽

Project description

FoolPyWebView

FoolPyWebView is a super-simple Python webview library that offers features such as file dragging, window transparency, and more that pywebview doesn't support. It allows creating many cool effects, such as CSS effects when the window appears and exits - another feature not supported by pywebview. While pywebview is lightweight, FoolPyWebView is based on PyQt5's QtWebEngineWidgets.

FoolPyWebView is a library encapsulated on PyQt5's QtWebEngineWidgets. The main goal of this library is to provide a seamless platform for JavaScript and Python to interact with each other. Whether it's JavaScript calling Python or Python calling JavaScript, it fully supports it. It also fully supports return values for types such as objects, dictionaries, arrays, etc. In addition, FoolPyWebView has rewritten the dragEvent to implement the function of dragging files and obtaining file paths. It also supports multi-window operations, and users can set #fool-drag in HTML to allow DOM to support dragging and moving windows.

Features

  • Seamless Data Interaction: Fully supports seamless data interaction between JavaScript and Python, whether it is JavaScript calling Python or Python calling JavaScript.

  • Type Compatibility: The returned data types support a variety of types, including objects, dictionaries, arrays, etc.

  • Drag and Drop File Functionality: Rewritten dragEvent to implement the function of dragging files and obtaining file paths.

  • Drag and Move Screen: Users can set #fool-drag in HTML, allowing the DOM to support dragging and moving the screen.

  • Multi-window Support: Can satisfy user needs for multi-window operations.

Upcoming Features

  1. Real-Time Data Synchronization: We plan to add a real-time data synchronization feature similar to Vuex.

  2. Multi-Window Management System: We are in the process of developing a multi-window management system that can manage parent-child relationships between windows.

  3. Prefabricated HTML Components: We will launch prefabricated HTML components, such as nav bar.

Installation

You can install FoolPyWebView through pip:

pip install FoolPyWebView

Usage

Below is a simple example of using FoolPyWebView:

# Please see the example folder

License

This project is licensed under the MIT License. For details, please refer to the LICENSE file.

Contribution

If you want to contribute to this project, feel free to submit a pull request or raise your questions or suggestions in the issue section.

Support

If you encounter any problems during use, or have any questions, you can seek help from us by submitting an issue. We will respond to your request as soon as possible.


We hope FoolPyWebView can help you better interact between Python and JavaScript!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FoolPyWebView-1.5.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FoolPyWebView-1.5.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file FoolPyWebView-1.5.0.tar.gz.

File metadata

  • Download URL: FoolPyWebView-1.5.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for FoolPyWebView-1.5.0.tar.gz
Algorithm Hash digest
SHA256 e52c4c16ab5e57619e06be1c9ca87d32ddfb54de25dce1d1d26eab2acbe5f360
MD5 5f952faa76c0bf493e8be6e1a8a8b86c
BLAKE2b-256 dcdfa7b58c2918e835692b58ab435afe535be0e42b61e8d1d49fe61d7d5bf059

See more details on using hashes here.

File details

Details for the file FoolPyWebView-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: FoolPyWebView-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for FoolPyWebView-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf06e611c06430f8d16316f96856667c4b7ffcce41ac493d50cca454e9ab17b6
MD5 bd84ff5555833e774ab40afa6baea3a9
BLAKE2b-256 14520748559a00ed88b84e1cf336f348188b112e6c7ca6de1080f78b03dc6866

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page