Skip to main content

Weather Wise

Overview

Welcome to Weather Wise, a Python module for accurate and reliable weather information. Weather Wise uses the National Weather Service (NWS) to fetch the current weather forecast and other weather-related details 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_with_unit = weather.get_temperature_in_fahrenheit(temperature_unit=True)
temperature_in_fahrenheit = weather.get_temperature_in_fahrenheit()
print(temperature_in_fahrenheit_with_unit)
print(temperature_in_fahrenheit)

# Get the temperature in celsius.
temperature_in_celsius_with_unit = weather.get_temperature_in_celsius(temperature_unit=True)
temperature_in_celsius = weather.get_temperature_in_celsius()
print(temperature_in_celsius_with_unit)
print(temperature_in_celsius)

# Get the probability of precipitation.
probability_of_precipitation_with_unit = weather.get_probability_of_precipitation(percentage_unit=True)
probability_of_precipitation = weather.get_probability_of_precipitation()
print(probability_of_precipitation_with_unit)
print(probability_of_precipitation)

# Get the relative humidity.
relative_humidity_with_unit = weather.get_relative_humidity(percentage_unit=True)
relative_humidity = weather.get_relative_humidity()
print(relative_humidity_with_unit)
print(relative_humidity)

# Get the wind speed.
wind_speed = weather.get_wind_speed()
wind_speed_without_unit = weather.get_wind_speed(wind_unit=False)
print(wind_speed)
print(wind_speed_without_unit)

# Get the wind direction.
wind_direction = weather.get_wind_direction()
print(wind_direction)

# Get the weather icon url.
icon_url = weather.get_weather_icon_url()
print(icon_url)

References

TODO

Metadata

Release files for weather-wise 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weather-wise 0.1.9
File Size Uploaded Provenance Actions
weather_wise-0.1.9.tar.gz 3.1 MB Without provenance Details for weather_wise-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for weather-wise 0.1.9
File Interpreter ABI Platform Actions
weather_wise-0.1.9-py3-none-any.whl Python 3 none any Details for weather_wise-0.1.9-py3-none-any.whl

Total release size: 6.4 MB

Release files / weather_wise-0.1.9.tar.gz

Download URL weather_wise-0.1.9.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
740ddaddc3bb4a16f872543ab8074fd731dede99b99bd613b3c1265cb3d5529d
BLAKE2b-256 checksum
How to use checksums
5e9346f7bb2aac2dda50ee3b8d397a5c4c2f830f0f1372411d5a3e288495c508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-55-generic

Release files / weather_wise-0.1.9-py3-none-any.whl

Download URL weather_wise-0.1.9-py3-none-any.whl
Size 3.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1415ae307abfa20227d4ca85741b68bc410e18561916ff65b5d7b53abb71911f
BLAKE2b-256 checksum
How to use checksums
d7ece4d9f8edee9463f4308704bfe27b71a37781ac7059f06a2bbf7d806ff91e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-55-generic

Security for weather-wise 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page