Skip to main content

Hyperf 多路复用 RPC 组件 Python 版本

Project description

Hyperf 多路复用 RPC 组件 Python 版本

如何使用

import asyncio

from roc.request import Request
from roc.socket import Client


async def main():
    client = Client(host="127.0.0.1", port=9502)
    while True:
        req = Request(path="/test/test",
                      params={"mobile": "123123", "data": "HelloWorld"})
        res = await client.request(req)
        print(res.result)
        await asyncio.sleep(1)


if __name__ == '__main__':
    asyncio.run(main())

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

roc_py-0.1.3.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file roc_py-0.1.3.tar.gz.

File metadata

  • Download URL: roc_py-0.1.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for roc_py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 486914a6240b1c6fe93ea15f62e83d1a46c4245f1c5d3c2b11ca3658f7893695
MD5 31b691a04217a7cc1e00abf51fb2211a
BLAKE2b-256 88adbde550bf1119a267dc36f481a21607eceb1ec8aecb6affdcd4c0af9908f3

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