Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.5 KB

File metadata and controls

35 lines (23 loc) · 1.5 KB

Feature Request

🎯 The Goal

Build a simple command-line interface (CLI) tool in Python that allows a user to get the current weather for a specified city.

The tool should:

  1. Accept a city name as an argument.

  2. Use the free Open-Meteo API to fetch the current temperature.

  3. Print the result to the console in a clean, human-readable format.

  4. Handle potential errors gracefully (e.g., city not found, API down).

🎨 Inspiration & Examples

There are no specific examples for this yet, as it's our first tool. We will establish the patterns with this feature.

📚 Required Knowledge

⚠️ Potential Pitfalls & Gotchas

  • The Open-Meteo API is a two-step process: first, you must get the coordinates for a city, then you use those coordinates to get the weather.

  • The API returns a lot of data. We only care about the current_weather object and specifically the temperature field.

  • Error handling is crucial. The tool should provide a clear message if the city can't be found by the Geocoding API.