Skip to main content

tsingroc-pymeteo

清鹏智能气象数据Python SDK

安装

pip install tsingroc-pymeteo

使用

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): 查询耗时

注意事项

表设置为ensemble_cn时,返回结果中data对应的pandas.DataFrame中每个数据都是列表,与其他表返回结果不同,需要自行进行后续处理,如计算均值等。

示例代码:

df = res["points"][0]["data"]
df = df.map(lambda x: sum(x) / len(x) if isinstance(x, list) else x)

Metadata

Release files for tsingroc-pymeteo 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tsingroc-pymeteo 0.2.0
File Size Uploaded Provenance
tsingroc_pymeteo-0.2.0.tar.gz 3.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tsingroc-pymeteo 0.2.0
File Interpreter ABI Platform
tsingroc_pymeteo-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / tsingroc_pymeteo-0.2.0.tar.gz

Download URL tsingroc_pymeteo-0.2.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ddd5f372528ac84cd84d717169ebb9e8cbc4fd29b7bc41ffba3049049846a666
BLAKE2b-256 checksum
How to use checksums
d5a080d48306a61dbfe743915d1a835bbfe6b85020d1c061fa8f0f26edb76025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2025.

Transparency log

Release files / tsingroc_pymeteo-0.2.0-py3-none-any.whl

Download URL tsingroc_pymeteo-0.2.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f43be9b57c4cb73ca68e7081e40815dd67d5e926a62887e33568005dda53118f
BLAKE2b-256 checksum
How to use checksums
f1fa550ebc1c9200abfc4e2eee372ec18a2dd1755ee5f1aa1e9d3689b6bb3e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2025.

Transparency log

Security for tsingroc-pymeteo 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tsingroc_pymeteo-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page