Skip to main content

NOAA API (V3) Python 3 SDK.

Project description

| |Build Status|

NOAA Python SDK
---------------

SDK for NOAA Weather Service REST API.

| Fully unit tested SDK for NOAA Weather Service REST API.
| https://forecast-v3.weather.gov/documentation
| https://github.com/paulokuong/noaa

Requirements
------------

- Python 3.4 (tested)

Goal
----

| To provide a generic wrapper for the latest V3 NOAA weather service API.
| Keep on changing this SDK when NOAA updates their API.
| Class can be extended / decorated.

Code sample
-----------

| To get weather forecast with postal code and country code.

.. code:: python

from noaa_sdk import noaa
n = noaa.NOAA()
res = n.get_forecasts('11365', 'US', True)
for i in res:
print(i)

| Sample response

.. code:: python
{'startTime': '2018-02-18T00:00:00-05:00', 'detailedForecast': '', 'shortForecast': 'Partly Cloudy', 'windSpeed': '5 mph', 'number': 148, 'icon': 'https://api.weather.gov/icons/land/night/sct?size=small', 'windDirection': 'SW', 'isDaytime': False, 'temperatureTrend': None, 'endTime': '2018-02-18T01:00:00-05:00', 'name': '', 'temperatureUnit': 'F', 'temperature': 34}
{'startTime': '2018-02-18T01:00:00-05:00', 'detailedForecast': '', 'shortForecast': 'Mostly Cloudy', 'windSpeed': '5 mph', 'number': 149, 'icon': 'https://api.weather.gov/icons/land/night/bkn?size=small', 'windDirection': 'SW', 'isDaytime': False, 'temperatureTrend': None, 'endTime': '2018-02-18T02:00:00-05:00', 'name': '', 'temperatureUnit': 'F', 'temperature': 33}
{'startTime': '2018-02-18T02:00:00-05:00', 'detailedForecast': '', 'shortForecast': 'Mostly Cloudy', 'windSpeed': '5 mph', 'number': 150, 'icon': 'https://api.weather.gov/icons/land/night/bkn?size=small', 'windDirection': 'SW', 'isDaytime': False, 'temperatureTrend': None, 'endTime': '2018-02-18T03:00:00-05:00', 'name': '', 'temperatureUnit': 'F', 'temperature': 31}
{'startTime': '2018-02-18T03:00:00-05:00', 'detailedForecast': '', 'shortForecast': 'Partly Cloudy', 'windSpeed': '5 mph', 'number': 151, 'icon': 'https://api.weather.gov/icons/land/night/sct?size=small', 'windDirection': 'SW', 'isDaytime': False, 'temperatureTrend': None, 'endTime': '2018-02-18T04:00:00-05:00', 'name': '', 'temperatureUnit': 'F', 'temperature': 31}

| To get weather observation data from all nearest stations in 11375, US between 2017-12-01 00:00:00 (UTC) to 2017-12-01 05:00:00 (UTC)

.. code:: python

from noaa_sdk import noaa
n = noaa.NOAA()
observations = n.get_observations('11365','US')
for observation in observations:
print(observation)

| To get weather forecast for a coordinate in USA

.. code:: python

from noaa_sdk import noaa
n = noaa.NOAA()
n.points_forecast(40.7314, -73.8656, hourly=False)

Contributors
------------

- Paulo Kuong (`@pkuong`_)

.. _@pkuong: https://github.com/paulokuong

.. |Build Status| image:: https://travis-ci.org/paulokuong/noaa.svg?branch=master
.. target: https://travis-ci.org/paulokuong/noaa

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

noaa-sdk-0.1.12b0.tar.gz (10.7 kB view details)

Uploaded Source

File details

Details for the file noaa-sdk-0.1.12b0.tar.gz.

File metadata

  • Download URL: noaa-sdk-0.1.12b0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for noaa-sdk-0.1.12b0.tar.gz
Algorithm Hash digest
SHA256 2d8dacc42ad59f0f4a5291e70da588591845f94065c9ee385f05f12995828fd1
MD5 ecd43a033a7ae8ea438c3d44c97ad3c9
BLAKE2b-256 774800d05a398af7431397eb44e871df608e962d02c7e8c8d120d905bf6cd7c9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page