Make it easy to use atxserver2
- Python 3.6+
pip install --upgrade atxserver2-python-client
import atxserver2
client = atxserver2.Client("http://localhost:4000", "xxxx-your-token-here-xxxxx")
for device in client.list_device():
print("Device", device)
device.acquire() # 占用设备
device.acquire(email="tt@example.com", idle_timeout=6000) # 指定用户占用设备, 时长6000秒
device.release() # 释放设备
print(device.atx_agent_address) # 获取设备信息