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
import json
import urllib.parse
import random
import requests
host = ('localhost', 8082) #接收消息地址(需与上方配置界面一致)
url = 'http://localhost:8081/MyQQHTTPAPI'  #发送消息地址
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
        print(datas)

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

TODO: 1.将API完整复刻至Python 2.实现一个包即可完成消息收发

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-0.0.1.tar.gz (5.1 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-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: remixqq_python_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.13.2 CPython/3.10.11 Windows/10

File hashes

Hashes for remixqq_python_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 84ea05be9fb25b01e396d07a03144823870be5ac04288b407d299cec0cd0230a
MD5 61a3244e3dd1fb206b51b7645bd15a96
BLAKE2b-256 ceed1a5ca95faf1b9c94e16ce189d961d0ce69741bf21c5ea107b25ce07b7833

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for RemixQQ_Python_SDK-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 240a56b2ebbe1b3ed97c1e40a2504ad46a5b72e417fb49374f4bb76af220a4fe
MD5 f8b458493569c3907230ab2fdb528126
BLAKE2b-256 1da9a1231f688d29fa369d47e99ee7f3dbb18deb8bddb6eb2aa61d6ccd235ed6

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