Skip to main content

A python SDK for RemixQQ connected by httpapi

Project description

RemixQQ_Python_SDK

给RemixQQ的Httpapi插件写的用于Python的SDK

要不是连API都没有能用的,我何苦自己写SDK啊!!

此SDk是基于MyQQ_Httpapi插件的,此插件的食用方法及下载方法参见RemixQQ官方网站

食用方法

  1. MyQQ_Httpapi的配置方法

    1. 在主界面配置端口号及Token(用于发送消息)
    2. 在“回调”界面配置接收消息用的地址(重要!!!)
  2. 使用pip安装

pip install RemixQQ_Python_SDK
  1. 使用以下代码进行初始化
from http.server import HTTPServer, BaseHTTPRequestHandler
from remixqq_python_sdk.app import App
import json
import urllib.parse
import random
import requests
host = ('localhost', 8082) #接收消息地址(需与上方配置界面一致)
app = App('http://localhost:8081/MyQQHTTPAPI', "Token", "QQ")
class Resquest(BaseHTTPRequestHandler):
    def do_POST(self):
        datas = self.rfile.read(int(self.headers['content-length'])).decode()
        datas = json.loads(datas)
        from_qun = urllib.parse.unquote(datas['MQ_fromID']) #获取消息来源群号
        msg = urllib.parse.unquote(datas['MQ_msg']) #获取消息内容
        # do something
        response = app.send_group_message("123",0,0,"test")
        print(response)

if __name__ == '__main__':
    server = HTTPServer(host, Resquest)
    print("Starting server, listen at: %s:%s" % host)
    server.serve_forever()

TODO:

  1. 将API完整复刻至Python
  2. 实现一个包即可完成消息收发
  3. 建立API文档

Release Note

0.0.1(发布日期:2024年4月26日)

  1. 已完成基础功能
  2. 发布包至PYPI,可使用pip安装
  3. 新增代办:建立API文档

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

remixqq_python_sdk-202404300043.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

RemixQQ_Python_SDK-202404300043-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file remixqq_python_sdk-202404300043.tar.gz.

File metadata

File hashes

Hashes for remixqq_python_sdk-202404300043.tar.gz
Algorithm Hash digest
SHA256 a1d472e04411858126c06e8dcbaeb5685df321d717aadaac9d428b8a20cd10a8
MD5 7ad2eb21c93b5f3f5b95c5db78ff0d71
BLAKE2b-256 2c4dca7d124bcdc3854e22de0745403e4e40fef48e669a06be5ea9efc020fb13

See more details on using hashes here.

File details

Details for the file RemixQQ_Python_SDK-202404300043-py3-none-any.whl.

File metadata

File hashes

Hashes for RemixQQ_Python_SDK-202404300043-py3-none-any.whl
Algorithm Hash digest
SHA256 f9c289267349edcafdac0ae2b33d83246f9d49d31c1fa3182d19f7a635025475
MD5 6fd7b03d3c1f9568fd046350689c5cef
BLAKE2b-256 bc1f5c2e50205c6f44ae85f77873444b3483a7667c84390b85d0c5504390aed0

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