Weather Query
Use the bundled script to fetch and summarize weather from OpenWeather 2.5/weather and 2.5/forecast.
Sandbox Constraints
This script runs inside a sandboxed environment with strict rules:
- •Only
.venv/bin/pythonis allowed. Do not use barepython,python3, or any other interpreter. - •No shell operators. Do not use
&&,||,;,|,>,<,$(...), or backticks. - •No
cd. Always use the relative path from the project root. - •No
--api-keyor--city. The API key is injected by the sandbox proxy. Geocoding is not available inside the sandbox. - •Always use
--latand--lon. Look up coordinates with WebSearch first. - •The exact command prefix must be:
.venv/bin/python plugins/weather-plugin/skills/weather-query/scripts/get_weather.py
Any command that does not match this format will be rejected.
Run Workflow
- •
Look up coordinates. Use WebSearch to find the latitude and longitude for the requested location. Example query:
"Chicago Illinois latitude longitude". - •
Run the script with
--latand--lon. Do not use--city(geocoding requires an API call that is not available inside the sandbox). - •
Summarize the result for the user.
- •Highlight current conditions first.
- •Mention precipitation chance, wind, and temperature range.
- •Note that severe alerts are not included by these endpoints.
Command Format
The only allowed Bash command format:
bash
.venv/bin/python plugins/weather-plugin/skills/weather-query/scripts/get_weather.py --lat <LAT> --lon <LON>
Optional flags (append after coordinates):
bash
.venv/bin/python plugins/weather-plugin/skills/weather-query/scripts/get_weather.py \ --lat 41.8781 \ --lon -87.6298 \ --units metric \ --lang en \ --hours 12 \ --days 5
Output Expectations
- •Current section: temperature, feels-like, humidity, pressure, wind, condition text.
- •Forecast section: timestamp (3-hour steps), temperature, precipitation probability, condition.
- •Daily section: date, min/max temperatures, precipitation probability, condition.
- •Alerts note: endpoint limitation message.
Troubleshooting
- •Command rejected: verify you are using
.venv/bin/pythonwith the relative path,--lat/--lon, and no shell operators. - •
401 Unauthorized: the proxy may not be running. It must be started separately. - •Missing fields: OpenWeather omits fields when not applicable for that location/time.
Reference
- •OpenWeather API details and field mapping:
references/openweather-current-forecast.md