♻️ refactor(playbook): streamline agents and refresh tsl docs
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# 天软 pyTSL 接口使用说明
|
||||
|
||||
## 定位
|
||||
|
||||
- 官方 Python SDK,面向取数/执行/批量/异步与数据转换。
|
||||
|
||||
## 结构索引
|
||||
|
||||
- 安装与配置
|
||||
- pyTSL 接口说明(Client / AsyncClient / async_util / Batch / Task / Const / TSResultValue)
|
||||
- pyTSLPy 兼容说明
|
||||
- 示例与数据类型转换
|
||||
- 附录与常见问题
|
||||
|
||||
## 安装方式(摘要)
|
||||
|
||||
- `pip install tspytsl`(在线安装)
|
||||
- 离线安装与手动部署
|
||||
|
||||
## 核心类与模块
|
||||
|
||||
- `pyTSL.Client`:同步客户端
|
||||
- `pyTSL.AsyncClient`:异步客户端
|
||||
- `pyTSL.async_util`:异步工具函数
|
||||
- `TSBatch` / `Task`:批量与任务
|
||||
- `TSResultValue`:统一返回结果封装
|
||||
- `pyTSL.Const`:常量与字段
|
||||
|
||||
## 关键方法(常用)
|
||||
|
||||
- `login` / `logout`
|
||||
- `exec` / `call` / `query`
|
||||
- `download_list` / `download` / `upload` / `remove`
|
||||
- `DatetimeToDouble` / `DoubleToDatetime`
|
||||
- `EncodeStream` / `DecodeStream`
|
||||
- `DataFrameToTSArray`
|
||||
|
||||
## 示例(Python)
|
||||
|
||||
```python
|
||||
import pyTSL
|
||||
|
||||
c = pyTSL.Client("user", "password")
|
||||
c.login()
|
||||
|
||||
result = c.query("select close from market where stock = 'SZ000001' end")
|
||||
print(result.dataframe())
|
||||
|
||||
c.logout()
|
||||
```
|
||||
Reference in New Issue
Block a user