Skip to main content

MiaoSpeed Client Library Implementations for Python.

Project description

MiaoSpeedLib

MiaoSpeed Client Library Implementations for Python.

Usage

from pypi:

pip install miaospeedlib -U

example:

import asyncio
import miaospeedlib as miaolib


slave_cfg = {
    "id": "local",
    "comment": "Local",
    "hidden": False,
    "token": "miaospeed-dev",
    "type": "miaospeed",
    "address": "127.0.0.1:8765",
    "option": {
        "downloadDuration": 8,
        "downloadThreading": 4,
        "pingAverageOver": 20,
        "taskRetry": 3,
        "downloadURL": "https://dl.google.com/dl/android/studio/install/3.4.1.0/android-studio-ide-183.5522156-windows.exe",
        "pingAddress": "http://www.google.com/generate_204",
        "stunURL": "udp://stunserver2024.stunprotocol.org:3478",
        "taskTimeout": 3000,
        "dnsServer": [
            "119.29.29.29:53",
            "223.5.5.5:53"
        ],
        "apiVersion": 2
    },
    "skipCertVerify": True,
    "tls": False,
    "invoker": "114514",
    "buildtoken": "MIAOKO4|580JxAo049R|GEnERAl|1X571R930|T0kEN",
    "path": "/miaospeed"
}

local_slave = miaolib.MiaoSpeedSlave().from_obj(slave_cfg)
isalive = asyncio.run(miaolib.MiaoSpeed.isalive(local_slave))
print("miaospeed slave isalive:", isalive)

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

miaospeedlib-0.1.0.tar.gz (27.4 kB view hashes)

Uploaded Source

Built Distribution

miaospeedlib-0.1.0-py3-none-any.whl (30.7 kB view hashes)

Uploaded Python 3

Supported by

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