All checks were successful
continuous-integration/drone/push Build is passing
weather_api
Datacose Weather API
Database Integration
- Implement SQLAlchemy with a local Postgres database.
- Design a
Location
model with attributes including id, name, latitude, and longitude.
API Endpoints
-
Manage Locations:
GET /locations
: Retrieve a list of all locations saved in the database, including their current weather conditions. This requires integrating with the OpenMeteo API to fetch weather data based on latitude and longitude.POST /locations
: Allow adding a new location by providing name, latitude, and longitude.DELETE /locations/{id}
: Enable location deletion by ID.
-
Weather Forecast:
GET /forecast/{location_id}
: Provide a detailed 7-day weather forecast for a specified location. This endpoint will call the OpenMeteo API to fetch forecast data based on the location's latitude and longitude stored in the database.
API Integration
- To fetch weather information, you are to use the OpenMeteo API. Given that this API requires latitude and longitude for location data, utilize this predefined list of locations as your hardcoded source.
Description
Languages
Python
95.9%
Dockerfile
4.1%