非同期クライアント

AsyncDobotClient は ese774_frame.clients.async_device_client.AsyncDeviceClient を継承します。method 呼び出しには await を使います。property の利用方法は生成されたクライアントの実装・型定義に従ってください。

import asyncio
from dobot.server_fastapi import AsyncDobotClient

async def main():
    client = AsyncDobotClient(server_ip="127.0.0.1", server_port=8000)
    print(await client.get_current_position())
    print(await client.get_current_angle())

asyncio.run(main())

AsyncDobotClient の async は Python の非同期 HTTP 呼び出しを意味します。move(is_async=True) は MG400 側の移動命令の完了待ち動作を指定するものであり、両者を混同しないでください。