Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PySky - the Python Weather Toolkit

PySky is a python weather toolkit that provides access into a number of publicly available weather databases. The goal of PySky is to provide a fast and easy-to-use interface to weather data in a pythonic way. The current implementation focuses on United States weather data from NOAA, although future weather systems will be incorporated. In particular, it provides hourly and daily forecast summaries.

Working with the module

The toolkit has several command-line scripts that return formatted weather data.

To obtain forecast data, forecast.py is used. For quick and dirty forecasts, forecast.py will use the NOAA XML web service to obtain forecast information. For more robust applications, users of forecast.py will want to use the grib2 option. The grib2 option downloads NOAA grib2 files which provide forecast elements for the entire United States. Querying grib2 data is much faster and efficient than querying the XML web service.

python bin/download (--grib2-dir=DIR) (--verbose)
python bin/forecast (--hourly) (--grib2-dir=DIR) (--verbose) LATITUDE LONGITUDE

Examples:

python bin/download # download to current directory
python bin/download --grib2-dir=/tmp # download data files to /tmp
python bin/forecast --grib2-dir=/tmp -- 38 -81 # get forecast for latitude 38 and longitude -81

Output for the forecast action are JSON encoded values of the following format:

{
    'daily' : [
        {
            'date' : *date*
            'high' : *high*,
            'low' : *low*,
            'humidity' : *humidity*,
            'precip_day' : *daytime % chance of precip*,
            'precip_night' : *night time % chance of precip*,
            'rain_amount' : *rain amount in inches*,
            'snow_amount' : *snow amount in inches*,
            'weather': *weather description*,
            'symbol': *weather symbol used by NOAA*,
            'wind_sustained': *sustained wind in MPH*,
            'wind_gust': *wind gusts in MPH*
        }, ...
    ],
    'hourly' : [
        {
            'date' : *date*,
            'time' : *time*,
            'temp' : *temperature*,
            'humidity' : *% humidity*,
            'precip' : *% chance of precipitation*,
            'rain_amount' : *rain amount in inches*,
            'snow_amount' : *snow amount in inches*,
            'sky' : *% cloud cover*:
            'weather: *weather description*,
            'wind_sustained': *sustained wind in MPH*,
            'wind_gust': *wind guests in MPH
        }, ...
    ]
 ]

Requirements

If using grib2 files (not web service), the NOAA degrib library must be installed http://www.nws.noaa.gov/mdl/degrib/ . In addition, the geodata directory included with the degrib source must be copied to the grib2 data directory.

Metadata

Release files for PySky 0.1.3dev

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

Source distribution (sdist)

Source distribution for PySky 0.1.3dev
File Size Uploaded
PySky-0.1.3dev.tar.gz 15.7 kB Details

Release files / PySky-0.1.3dev.tar.gz

Download URL PySky-0.1.3dev.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8e20a30b2b0a9abb280a437345dcd29602ce226f0259097a2af435ea0685e1a7
BLAKE2b-256 checksum
How to use checksums
e252759bc5007ff1c17eaa63c9d0eac08b448d59a5f9a5c249a4183e0cce5086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
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