Metadata-Version: 2.3
Name: tsingroc-pymeteo
Version: 0.1.3
Summary: 
Author: Jun Zhang
Author-email: zhangjun@tsingroc.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: numpy (>=1,<2)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: shapely (>=2,<3)
Description-Content-Type: text/markdown

# tsingroc-pymeteo

清鹏智能气象数据Python SDK

## 安装

```shell
pip install tsingroc-pymeteo
```

## 使用

```python
from tsingrocpymeteo import Meteo
from shapely.geometry import box
from datetime import datetime

meteo = Meteo(
    "<后端服务地址>", "<access key>", "<secret key>"
)

# 创建查询范围，类型为shapely.Polygon
center = (115.875, 27.5)
bbox = box(center[0] - 0.4, center[1] - 0.4, center[0] + 0.4, center[1] + 0.4)

res = meteo.get(
    "archive_cn", # 数据表名
    None,
    "era5", # 气象模型名
    bbox,
    (datetime(2024, 11, 7, 0, 0, 0, 0), datetime(2024, 11, 8, 0, 0, 0, 0)), # 时间范围
)

print(res)
```

响应格式如下：
- dict: 查询结果
    - table_name (str): 数据表名
    - points (List[dict]): 查询结果
        - model (str): 气象模型名
        - location (str): 坐标点的 WKT 字符串
        - data (pd.DataFrame): 查询结果
    - cost (dict): 查询耗时

