Generate simulated weather data for any city. Useful for demos, testing, or when no real weather API is available.
Run the script directly:
# Current weather (today)
python3 scripts/mock_weather.py <city>
# Multi-day forecast (1-7 days)
python3 scripts/mock_weather.py <city> --forecast <days>
Examples:
python3 scripts/mock_weather.py 北京
python3 scripts/mock_weather.py Shanghai --forecast 5
python3 scripts/mock_weather.py 深圳 --forecast 7
| Field | Description |
|---|---|
| ------- | ------------- |
| 天气 | Weather condition (晴/多云/雨/雪 etc.) |
| 气温 | Low ~ High temperature (°C) |
| 湿度 | Humidity (%) |
| 风力 | Wind direction + level |
共 1 个版本