PyPI
pypi.org › project › python-weather
python-weather · PyPI
A free and asynchronous weather API wrapper made in Python, for Python.
» pip install python-weather
Published Jan 23, 2026
Version 2.1.2
Readthedocs
python-weather.readthedocs.io
python-weather
weather = await client.get('New York') # Fetch the temperature for today. print(weather.temperature) # Fetch weather forecast for upcoming days. for daily in weather: print(daily) # Each daily forecast has their own hourly forecasts.
Simple Python Weather App
might want to invalidate that api key. api keys are like passwords. More on reddit.com
API for weather forecast data gathering
Hi, I am trying to get data from a weather api, actually the website is called “weatherapi.com” I want to get max temperature and min temperature for 3 days in the future. The api allows you to query a forecast for 3 days. I will paste what the api sends back. More on discuss.python.org
Simple python script to obtain immediate hourly forecast from NWS without the API
This is some of the worst formatted code I’ve seen More on reddit.com
Best Weather API
I found weatherapi.com easy to use, but they limit free API calls to 3 days of data. I wanted to use NOAA's API, but couldn't make the returns usable before the project due date. Maybe you'll have better luck. ... I went to two python courses and both used https://openweathermap.org in their ... More on reddit.com
Videos
54:28
Create a weather app with Python! ☀️ - YouTube
Professional Weather App with Django in Python
Weather API Tutorial in Python
08:29
Python Weather App in 8 Minutes - YouTube
42:34
Build YOUR OWN Weather App in Python with Flask (COMPLETE Beginner ...
GeeksforGeeks
geeksforgeeks.org › python › python-find-current-weather-of-any-city-using-openweathermap-api
Find current weather of any city using OpenWeatherMap API in Python - GeeksforGeeks
July 11, 2025 - Making more than 60 calls per minute requires a paid subscription starting at USD 40 per month. Access to historical data requires a subscription starting at 150 USD per month. Users can request current weather information, extended forecasts, and graphical maps (showing cloud cover, wind speed, pressure, and precipitation).
Bigl
bigl.es › using-python-to-get-weather-data
Using Python to get weather data
May 2, 2015 - My current favourite is Open Weather Map which is an open source API for weather data, and it comes with a great Python library.
GitHub
github.com › rachanahegde › python-weather-app
GitHub - rachanahegde/python-weather-app: A website built with Flask and OpenWeather API that displays the weather forecast for any city. *Optimised for desktop and mobile view. NOTE: Website is down since Heroku removed free plans. · GitHub
A website built with Flask and OpenWeather API that displays the weather forecast for any city. *Optimised for desktop and mobile view. NOTE: Website is down since Heroku removed free plans. - rachanahegde/python-weather-app
Starred by 10 users
Forked by 17 users
Languages HTML 38.7% | CSS 37.1% | Python 24.1% | Procfile 0.1%
GitHub
github.com › null8626 › python-weather
GitHub - null8626/python-weather: A free and asynchronous weather API wrapper made in python, for python. · GitHub
weather = await client.get('New York') # Fetch the temperature for today. print(weather.temperature) # Fetch weather forecast for upcoming days. for daily in weather: print(daily) # Each daily forecast has their own hourly forecasts.
Starred by 113 users
Forked by 31 users
Languages Python
Meteosource
meteosource.com › blog › weather-api-for-python
The Best Weather API for Python
The final verdict was easy to make. From those high-quality weather data providers we have selected, only Meteosource provides a Python wrapper library called pymeteosource that makes it very easy to use the weather API in your Python applications.
Open-Meteo
open-meteo.com
🌤️ Free Open-Source Weather API | Open-Meteo.com
Whether you're using Python, R, Julia, PHP, JavaScript, React, Flutter, Java, or any other programming language, our APIs are designed to work effortlessly with your application. We're constantly evolving and expanding. We're dedicated to providing you with the latest features, weather variables, and data sources.
Reddit
reddit.com › r/weather › simple python script to obtain immediate hourly forecast from nws without the api
r/weather on Reddit: Simple python script to obtain immediate hourly forecast from NWS without the API
December 10, 2024 -
EDIT: Enhanced version in comments.
The National Weather Service API is complex and byzantine in my experience, so I made this python script to parse their tabular hourly forecasts which meets my needs for machine readable immediate wind and rain forecast data:
import re
import requests
html = requests.get(
'https://forecast.weather.gov/MapClick.php?lat=21.3069&lon=-157.8583&unit=0&lg=english&FcstType=digital'
).text
html = next(line for line in html.splitlines() if "<b>Date" in line)
regex_suffix = '.*?<b>([^<]+)</b>' * 2 # up to 24 data; 48 with the other "<b>Date" line
hour_current, hour_upcoming = re.search(f"Hour{regex_suffix}", html).groups()
temp_current, temp_upcoming = re.search(f"Temperature{regex_suffix}", html).groups()
dir_current, dir_upcoming = re.search(f"Wind Dir{regex_suffix}", html).groups()
wind_current, wind_upcoming = re.search(f"Surface Wind{regex_suffix}", html).groups()
precip_current, precip_upcoming = re.search(f"Precipitation{regex_suffix}", html).groups()
print("Current hour:", int(hour_current))
print(" Wind direction:", dir_current)
print(" Wind speed:", wind_current, "mph")
print(" Temperature:", temp_current, "°F")
print(" Precipitation potential:", precip_current, "%")
print("Upcoming hour:", int(hour_upcoming))
print(" Wind direction:", dir_upcoming)
print(" Wind speed:", wind_upcoming, "mph")
print(" Temperature:", temp_upcoming, "°F")
print(" Precipitation potential:", precip_upcoming, "%")Change the "lat=21.3069&lon=-157.8583" parameters for your location of interest. Example output:
Current hour: 6 Wind direction: ENE Wind speed: 16 mph Temperature: 75 °F Precipitation potential: 13 % Upcoming hour: 7 Wind direction: ENE Wind speed: 16 mph Temperature: 75 °F Precipitation potential: 13 %
Top answer 1 of 2
2
This is some of the worst formatted code I’ve seen
2 of 2
1
Here's an enhanced version, which will take a command line argument number of hours to show, defaulting to 12: import re import requests import sys def weather_forecast(hours=12): num_hours = min(max(int(hours), 1), 24) html = requests.get( 'https://forecast.weather.gov/MapClick.php?lat=21.3069&lon=-157.8583&unit=0&lg=english&FcstType=digital' ).text html = next(line for line in html.splitlines() if "Date" in line) regex_suffix = '.*?([^<]+)' * num_hours return { "hour": [int(hour) for hour in re.search(f"Hour{regex_suffix}", html).groups()], "direction": re.search(f"Wind Dir{regex_suffix}", html).groups(), "speed": re.search(f"Surface Wind{regex_suffix}", html).groups(), "temp": re.search(f"Temperature{regex_suffix}", html).groups(), "precip": re.search(f"Precipitation{regex_suffix}", html).groups() } if __name__ == "__main__": try: data = weather_forecast(int(sys.argv[1]) if len(sys.argv) > 1 else 12) print("Hour of day (0-23):" + " ".join(f"{n:>4}" for n in data['hour'])) print("Wind direction: " + " ".join(f"{n:>4}" for n in data['direction'])) print("Wind speed (mph): " + "".join(f"{n:>4}{'⚠️' if int(n) > 35 else ' '}" for n in data['speed'])) print("Temperature (°F): " + " ".join(f"{n:>4}" for n in data['temp'])) print("Precipitation (%): " + "".join(f"{n:>4}{'⚠️' if int(n) > 50 else ' '}" for n in data['precip'])) except Exception as e: print(f"An error occurred: {e}") Example output: Hour of day (0-23): 13 14 15 16 17 18 19 20 21 22 23 0 Wind direction: ENE ENE ENE ENE ENE ENE ENE ENE ENE ENE ENE ENE Wind speed (mph): 21 21 21 21 20 20 20 20 20 20 20 20 Temperature (°F): 83 83 83 82 81 80 78 78 78 78 78 77 Precipitation (%): 11 11 11 11 11 13 13 13 13 13 13 20
Reddit
reddit.com › r/learnpython › best weather api
r/learnpython on Reddit: Best Weather API
August 24, 2023 - I found weatherapi.com easy to use, but they limit free API calls to 3 days of data. I wanted to use NOAA's API, but couldn't make the returns usable before the project due date. Maybe you'll have better luck. ... I went to two python courses and both used https://openweathermap.org in their lessons.
Readthedocs
herbie.readthedocs.io
Herbie: Download Weather Forecast Model Data in Python — Herbie 2026.3.0 documentation
Herbie is a Python package that makes downloading and working with numerical weather prediction (NWP) model data simple and fast.
GitHub
github.com › meteostat › meteostat
GitHub - meteostat/meteostat: Access and analyze historical weather and climate data with Python. · GitHub
Starred by 628 users
Forked by 77 users
Languages Python
Meteomatics
meteomatics.com › home › weather api › python weather api
Python Weather API | Meteomatics
December 18, 2025 - This includes time series of various weather model data, station data, forecast data, radar and satellite images. Deploy area queries: This allows users to fetch data over a regular grid, making it an ideal tool for in-depth analysis and data science applications. ... Access the Python library and see examples of the Meteomatics Weather API for Python in action, including demo scripts for interesting use cases such as producing an automatic energy market forecast.
WeatherAPI
weatherapi.com
Free Weather API - WeatherAPI.com
WeatherAPI.com free weather API and weather data and Geolocation API (JSON and XML) for hourly, daily and 15 min interval weather, historical data, bulk request, astronomy, sports and much more.