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 进行封装,提供了简单易用的接口

PyPi 包页面: PYPI | wx-connector-pysdk

使用方法

环境安装

我们需要先安装 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("测试消息","小米")

开发文档

开发文档还在路上喵,请各位小看一下只有100行的简单代码凑合一下喵

on 方法支持的事件列表请看

ApiFox | WxConnectorProvider

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.1.tar.gz (22.8 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.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wx_connector_pysdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 abb78819c2d9329edd5b75c3ad648c4a5ebde3b44c581d0debf5553a10cbf9c2
MD5 ea084fbc5bca631b3812c00652e4a632
BLAKE2b-256 0080b88ffa81be137bf946c6f9a8cf8bc790cd2a6c1abf1bab8e1cd77126837d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wx_connector_pysdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caead3e9e06cb307ad89b11cf8a525d1ce1e7ca359e8d7f081019ed4834ff368
MD5 5ae1b9078ace5e1f84fcd5def5c263e7
BLAKE2b-256 cf92f21631d428b2b865a7bfc9f6d66eb74caaf904e6ff491f594ebb819820d2

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