Skip to main content

wx-connector-pysdk 是一个为便捷在python项目中使用WxConnector进行开发而构建的轮子

Project description

wx-connector-pysdk

写在前面

欢迎各位给项目提出建议和问题,欢迎提出 issue 和 pr

主操作封装库:GitHub | WxConnectorLib

Api提供连接件:GitHub | WxConnectorProvider

求佬们给用的到的项目点点 Star 谢谢喵

项目介绍

本项目是 WxConnector 系列项目的 python 开发 sdk

对 WxConnectorProvider 提供的 api 进行封装,提供了简单易用的接口

使用方法

环境安装

我们需要先安装 dotnet 8.0 runtime 环境

可以在 Download Dotnet 8.0 该URL中的 .NET Desktop Runtime 8.0.x中获取

也可以在 123云盘文件分享 | Dotnet-Runtime-8.0.15-win-x64 中获取

安装主程序

GitHub | WxConnectorProviderRelease 页面中下载最新版的安装包安装

使用前双击启动主程序即可

在 python 项目中安装 sdk

使用pip

pip install wx-connector-pysdk

或使用 uv

uv add wx-connector-pysdk

使用示例

# 设置 WxConnectorProvider 的 Url
set_url("localhost:8022")
# 启动 WeChat
strat_wx(r"C:\Program Files\Tencent\WeChat\WeChat.exe")
# 启动监听并添加监听事件
start_listeners(["小米"])
# 启动本地事件监听
start_event_listen()

# 添加事件处理函数
@event.on("NewMessageWithoutSelfEvent")
def handle_new_msg(msg: WMessage) -> None:
    print(f"从{msg.MsgFromWindow}窗口收到{msg.MsgSenderName}的信息说:{msg.MsgContent}")

time.sleep(30)
# 发送测试消息
send_text("测试消息","小米")

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

wx_connector_pysdk-0.1.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

wx_connector_pysdk-0.1.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file wx_connector_pysdk-0.1.0.tar.gz.

File metadata

  • Download URL: wx_connector_pysdk-0.1.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for wx_connector_pysdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 238c00a7f0c32de87776da035cf0f696492b9a3daf49c84d591ba1ca67ae5f77
MD5 54cd109463c2b7f56d808927e015dc2e
BLAKE2b-256 4884bbfbfe4809bc6b1a4dff63f9b0af71b22cc893aec3f3451b14fab5f5b327

See more details on using hashes here.

File details

Details for the file wx_connector_pysdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wx_connector_pysdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4c56191f8d86ae348e3fe013618e97bfb2767200c5a770f09e09f5b1de9f32f
MD5 499ff89a153703ba0c5d2c8675adf5ab
BLAKE2b-256 e627a40fb6c9e22adbe7bf3b633b90fb0a5077b7781bab429ba295f3d30ca6fc

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