← 返回
开发者工具 Key 中文

KnowAir Forecast 明气预报

Get hourly (up to 360 hours) and daily (up to 15 days) weather forecasts by latitude and longitude via the Caiyun Weather API. Returns temperature trends, we...
通过彩云天气API,根据经纬度获取最长360小时的逐小时及15天的逐日天气预报。返回温度趋势、天气状况等信息。
shuowang-ai
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 482
下载
💾 6
安装
1
版本
#latest

概述

KnowAir Forecast — Hourly & Daily Weather Forecasts

Query detailed hourly and daily weather forecasts for any location using the Caiyun Weather API.

Prerequisites

  1. A valid Caiyun Weather API token set as CAIYUN_TOKEN environment variable, or stored in ~/.config/knowair/token.
  2. Coordinates (longitude, latitude) for the target location.

Quick Start

python3 scripts/query_forecast.py --lng 116.3176 --lat 39.9760 --type daily --days 7

Workflow

  1. Resolve coordinates — convert city name to longitude and latitude if needed.
  2. Choose forecast typehourly or daily.
  3. Run the script:

```bash

python3 scripts/query_forecast.py --lng --lat --type

```

  1. Present results — highlight temperature ranges, precipitation probability, and notable weather changes.

Options

FlagDescriptionDefault
----------------------------
--lngLongitude (-180 to 180)Required
--latLatitude (-90 to 90)Required
--typehourly or dailydaily
--hoursHours to forecast (1-360, hourly mode)48
--daysDays to forecast (1-15, daily mode)7
--detail-levelDisplay density 0-6 (0=auto, 1=every hour, etc.)0
--langOutput language: en or zhen

Defaults

  • Forecast type: daily
  • Days: 7, Hours: 48
  • Detail level: auto (0)
  • Language: en

Failure Handling

  • Missing token → exit code 2 with setup instructions.
  • API error → exit code 1 with error details.
  • Network unreachable → suggest the user check connectivity.

Additional Resources

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 03:39 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,044
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,777
data-analysis

KnowAir Air Quality 明气空气质量

shuowang-ai
通过彩云天气API,根据经纬度获取最长360小时的逐小时及15天的逐日天气预报。返回温度趋势、天气状况等信息。
★ 0 📥 509