Obtain local weather information based on zipcode.
Project description
Weather Wise
Overview
Get the current weather forecast and other weather related information from a zipcode. This module uses the U.S. Census 2022 Gazetteer (Zip Code Tabulation Areas). The original file has been modified to JSON.
Usage
import json
from weather_wise.weather_wise import WeatherWise
weather = WeatherWise("32904")
# Internal weather methods.
print(weather._load_json_data())
print(weather._get_latitude_longitude())
print(weather._get_weather_forecast_url())
print(json.dumps(weather._get_weather_data(), indent=2))
# Get the short forecast.
short_forecast = weather.get_short_forecast()
print(short_forecast)
# Get the temperature in fahrenheit.
temperature_in_fahrenheit = weather.get_temperature_in_fahrenheit(temperature_unit=True)
print(temperature_in_fahrenheit)
# Get the temperature in celsius.
temperature_in_celsius = weather.get_temperature_in_celsius()
print(temperature_in_celsius)
# Get the chance of rain.
chance_of_rain = weather.get_probability_of_precipitation()
print(chance_of_rain)
# Get the wind speed.
wind_speed = weather.get_wind_speed()
print(wind_speed)
# Get the wind direction.
wind_direction = weather.get_wind_direction()
print(wind_direction)
# Get the wind.
wind = weather.get_wind()
print(wind)
References
-
Gazetteer Files
-
API Documentation
-
API Discussion
-
Outage & Status Messages
TODO
- Get severe weather alerts.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
weather_wise-0.1.5.tar.gz
(1.4 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weather_wise-0.1.5.tar.gz.
File metadata
- Download URL: weather_wise-0.1.5.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71e994c369a33e589f81e305c639b95aaa25718337bdb917b633a1ef9b168b28
|
|
| MD5 |
da1e66796a26122b9d07928f851425b4
|
|
| BLAKE2b-256 |
9a47e431ac32ff35b454872df413fac802f1f25039627c54aab94a6541686419
|
File details
Details for the file weather_wise-0.1.5-py3-none-any.whl.
File metadata
- Download URL: weather_wise-0.1.5-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edfc10b805667f47c891356206b9cf955e06eb9b591327db39dd4c9e96b4fe24
|
|
| MD5 |
e6aa6e877e1dfd00dec365b09954ee5e
|
|
| BLAKE2b-256 |
bb91484ca5a00beed6be935e563fef20340adadc9de5addeeb130db7526e9d98
|