Skip to content

WeatherAPI-Py is a Python package that retrieves real-time air temperature from Open-Meteo and OpenWeather using latitude and longitude. It supports multiple APIs, provides easy integration, and includes a conversion function for OpenWeather data. Ideal for weather apps and data analysis.

License

Notifications You must be signed in to change notification settings

massan11/WeatherAPI-Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeatherAPI-Py 🌍☁️

A Python package for retrieving real-time air temperature from Open-Meteo and OpenWeather APIs. Supports multiple APIs, easy integration, and includes Kelvin-to-Celsius conversion for OpenWeather.

🌟 Features

  • ✅ Supports Open-Meteo & OpenWeather APIs
  • ✅ Object-oriented architecture for easy extension
  • ✅ Kelvin to Celsius conversion for OpenWeather
  • ✅ Lightweight and easy to use

🚀 Installation

pip install weatherapi-py

📌 Usage

from weatherapi import OpenMeteo, OpenWeather

# Using Open-Meteo
open_meteo = OpenMeteo(35.6944, 51.4215)
temperature = open_meteo.get_current_temperature()
print(f"Temperature from Open-Meteo: {temperature}°C")

# Using OpenWeather (requires API key)
open_weather = OpenWeather(35.6944, 51.4215, api_key="your_api_key")
temperature = open_weather.get_current_temperature()
temperature = open_weather.kelvin_to_celsius(temperature)
print(f"Temperature from OpenWeather: {temperature}°C")

📜 License
This project is licensed under the MIT License.

About

WeatherAPI-Py is a Python package that retrieves real-time air temperature from Open-Meteo and OpenWeather using latitude and longitude. It supports multiple APIs, provides easy integration, and includes a conversion function for OpenWeather data. Ideal for weather apps and data analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages