Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard Pogodowy / Weather Dashboard


🇵🇱 Polski

Opis

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.

Funkcje

  • 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)

Wymagania

  • Python 3.10+
  • pip

Instalacja i uruchomienie

git clone https://github.com/Iakirmon/weather_api.git
cd weather_api
pip install -r requirements.txt
python app.py

Otwórz przeglądarkę pod adresem: http://127.0.0.1:5000

Uruchomienie testów

pytest -v

Struktura projektu

weather_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

Endpointy API

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

Technologie

  • Backend: Python, Flask, Requests, Plotly
  • Frontend: Bootstrap 5, Plotly.js, Vanilla JS
  • API: Open-Meteo (bezpłatne, bez klucza API)

🇬🇧 English

Description

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.

Features

  • 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)

Requirements

  • Python 3.10+
  • pip

Installation & Running

git clone https://github.com/Iakirmon/weather_api.git
cd weather_api
pip install -r requirements.txt
python app.py

Open your browser at: http://127.0.0.1:5000

Running Tests

pytest -v

Project Structure

weather_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

API Endpoints

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

Tech Stack

  • Backend: Python, Flask, Requests, Plotly
  • Frontend: Bootstrap 5, Plotly.js, Vanilla JS
  • API: Open-Meteo (free, no API key required)

About

Simple Python weather API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages