weather_api/README.md
Argiris Deligiannidis a3fe250870 Edit README
2024-04-07 13:02:52 +03:00

1.2 KiB

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