Webowa aplikacja Flask wyświetlająca interaktywne wykresy pogodowe na podstawie danych z Open-Meteo API. Umożliwia wyszukiwanie miast w czasie rzeczywistym, wybór zmiennych pogodowych oraz przeglądanie prognoz godzinowych i dobowych.
- Live search miast z podpowiedziami (debounce 300 ms)
- Prognoza od 1 do 16 dni
- Wybór zmiennych: temperatura, opady, wiatr, wilgotność, zachmurzenie, ciśnienie, indeks UV
- Interaktywne wykresy liniowe i słupkowe (Plotly)
- Bieżące warunki pogodowe (temperatura, odczuwalna, wiatr, opady, wilgotność, opis)
- Ciemny motyw (Bootstrap 5 dark mode)
- Python 3.10+
- pip
git clone https://github.com/Iakirmon/weather_api.git
cd weather_api
pip install -r requirements.txt
python app.pyOtwórz przeglądarkę pod adresem: http://127.0.0.1:5000
pytest -vweather_api/
├── app.py # Aplikacja Flask, endpointy API
├── geocoding.py # Klient Open-Meteo Geocoding API
├── weather.py # Klient Open-Meteo Forecast API + kody WMO
├── charts.py # Budowanie wykresów Plotly
├── templates/
│ └── index.html # Frontend: Bootstrap 5 + Plotly.js + vanilla JS
├── tests/
│ ├── conftest.py
│ ├── test_geocoding.py
│ ├── test_weather.py
│ ├── test_charts.py
│ └── test_app.py
└── requirements.txt
| Endpoint | Metoda | Opis |
|---|---|---|
/ |
GET | Strona główna (dashboard) |
/api/cities?q=<nazwa> |
GET | Wyszukiwanie miast (min. 2 znaki) |
/api/weather?lat=&lon=&days=&vars= |
GET | Dane pogodowe i wykresy |
- Backend: Python, Flask, Requests, Plotly
- Frontend: Bootstrap 5, Plotly.js, Vanilla JS
- API: Open-Meteo (bezpłatne, bez klucza API)
A Flask web application displaying interactive weather charts based on data from the Open-Meteo API. Supports real-time city search, selection of weather variables, and hourly/daily forecast views.
- Live city search with autocomplete suggestions (300 ms debounce)
- Forecast range from 1 to 16 days
- Variable selection: temperature, precipitation, wind speed, humidity, cloud cover, pressure, UV index
- Interactive line and bar charts (Plotly)
- Current weather conditions (temperature, apparent temperature, wind, precipitation, humidity, description)
- Dark theme (Bootstrap 5 dark mode)
- Python 3.10+
- pip
git clone https://github.com/Iakirmon/weather_api.git
cd weather_api
pip install -r requirements.txt
python app.pyOpen your browser at: http://127.0.0.1:5000
pytest -vweather_api/
├── app.py # Flask application, API routes
├── geocoding.py # Open-Meteo Geocoding API client
├── weather.py # Open-Meteo Forecast API client + WMO codes
├── charts.py # Plotly chart builders
├── templates/
│ └── index.html # Frontend: Bootstrap 5 + Plotly.js + vanilla JS
├── tests/
│ ├── conftest.py
│ ├── test_geocoding.py
│ ├── test_weather.py
│ ├── test_charts.py
│ └── test_app.py
└── requirements.txt
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Main page (dashboard) |
/api/cities?q=<name> |
GET | City search (min. 2 characters) |
/api/weather?lat=&lon=&days=&vars= |
GET | Weather data and charts |
- Backend: Python, Flask, Requests, Plotly
- Frontend: Bootstrap 5, Plotly.js, Vanilla JS
- API: Open-Meteo (free, no API key required)