mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 13:24:15 +08:00
- Package directory: src/xmtdx/ -> src/easy_tdx/ - Import path: from easy_tdx import ... - pip install easy-tdx - Add LICENSE (MIT) with upstream attribution (pytdx, xmtdx) - Add NOTICE with detailed attribution - Update all examples, tests, scripts, docs - Bump version to 1.0.0 BREAKING CHANGE: import path changed from `xmtdx` to `easy_tdx` Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
10 lines
315 B
Python
10 lines
315 B
Python
"""演示:测量多台通达信服务器延迟并排序。"""
|
|
|
|
import pandas as pd
|
|
from easy_tdx import TdxClient
|
|
|
|
results = TdxClient.ping_all()
|
|
df = pd.DataFrame(results, columns=["服务器", "延迟(s)"])
|
|
df["延迟(ms)"] = df["延迟(s)"] * 1000
|
|
print(df[["服务器", "延迟(ms)"]].to_string(index=False))
|