← 返回
开发者工具 Key 中文

QWeather City Weather

Query QWeather city codes and real-time weather with bundled executable scripts. Use when users need to resolve city names to QWeather location IDs/adcodes,...
通过捆绑的可执行脚本查询QWeather城市代码和实时天气。适用于用户需要将城市名称解析为QWeather位置ID/区域码时使用。
richliao1112
开发者工具 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 525
下载
💾 11
安装
1
版本
#api#city#latest#qweather#weather

概述

qweather-city-weather

Use this skill primarily via the bundled script:

  • scripts/qweather_query.py

This makes the skill portable across machines and independent from a local Next.js service.

Prerequisites

  • Python 3.10+ available
  • Required QWeather API key:
  • set QWEATHER_API_KEY, or
  • pass --api-key
  • Required QWeather API host:
  • set QWEATHER_API_HOST, or
  • pass --api-host

Default execution flow

  1. Search city candidates and get location IDs:
python3 scripts/qweather_query.py search-city --query "Hangzhou" --api-host "<QWEATHER_API_HOST>" --api-key "<QWEATHER_API_KEY>"
  1. Pick best city by id/name/adm1/adm2.
  1. Query current weather with location ID:
python3 scripts/qweather_query.py get-weather --location "101210101" --api-host "<QWEATHER_API_HOST>" --api-key "<QWEATHER_API_KEY>"
  1. Or run one-shot city -> weather:
python3 scripts/qweather_query.py city-weather --query "Hangzhou" --api-host "<QWEATHER_API_HOST>" --api-key "<QWEATHER_API_KEY>"

Script command reference

  • search-city
  • required: --query
  • optional: --number (default 10)
  • get-weather
  • required: --location
  • city-weather
  • required: --query
  • optional: --preferred-name for exact city-name match

Global options for all subcommands:

  • --api-key
  • --api-host
  • --timeout (seconds, default 5.0)

Output and error contract

  • Success: JSON with success: true
  • Failure: JSON with success: false + error, process exits non-zero
  • Never guess city when no result; return explicit no-match failure

Direct API reference

For endpoint and payload details of the official QWeather API, read:

  • references/qweather-http-contract.md

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-30 12:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

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

Gog

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

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,176