pynws


Namepynws JSON
Version 1.8.2 PyPI version JSON
download
home_pageNone
SummaryPython library to retrieve observations and forecasts from NWS/NOAA
upload_time2024-06-20 19:46:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License
keywords nws weather
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # pynws

A python library to asynchronously retrieve weather observation from NWS/NOAA.

![PyPI - Downloads](https://img.shields.io/pypi/dm/pynws?style=flat-square)

## Example
See [example.py](example.py) for a runnable example.
```python
PHILLY = (39.95, -75.16)
USERID = "testing@address.xyz"

async def example():
    async with aiohttp.ClientSession() as session:
        nws = pynws.SimpleNWS(*PHILLY, USERID, session)
        await nws.set_station()
        await nws.update_observation()
        await nws.update_forecast()
        await nws.update_alerts_forecast_zone()
        print(nws.observation)
        print(nws.forecast[0])
        print(nws.alerts_forecast_zone)
```

## Functionality
pynws exposes the ability to retrieve raw data using `raw_data` module. `Nws` class offers ability to retrieve minimally processed data for a single location.  `SimpleNWS` class offers data caching and several other helpers for interpreting output.


### Units for Observations in SimpleNWS
NWS API does not expose all possible units for observations.  Known units are converted to the following:

|unit type   | known NWS units| pynws unit |
|------------|----------------|------------|
|temperature | degF, degC     | Celsius    |
|pressure    | Pa             | Pascal     |
|speed       | m_s-1, km_h-1  | km_h-1     |
|percent     | percent        | percent    |
|angle       | degree_(angle) | degrees    |
|distance    | m              | meter      |

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pynws",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "nws, weather",
    "author": null,
    "author_email": "Matthew Flamm <matthewhflamm0@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6c/13/1d73ae2ce29a6c7f6fdfa9556df0911721c19204e46880a60b94c92a52d9/pynws-1.8.2.tar.gz",
    "platform": null,
    "description": "# pynws\n\nA python library to asynchronously retrieve weather observation from NWS/NOAA.\n\n![PyPI - Downloads](https://img.shields.io/pypi/dm/pynws?style=flat-square)\n\n## Example\nSee [example.py](example.py) for a runnable example.\n```python\nPHILLY = (39.95, -75.16)\nUSERID = \"testing@address.xyz\"\n\nasync def example():\n    async with aiohttp.ClientSession() as session:\n        nws = pynws.SimpleNWS(*PHILLY, USERID, session)\n        await nws.set_station()\n        await nws.update_observation()\n        await nws.update_forecast()\n        await nws.update_alerts_forecast_zone()\n        print(nws.observation)\n        print(nws.forecast[0])\n        print(nws.alerts_forecast_zone)\n```\n\n## Functionality\npynws exposes the ability to retrieve raw data using `raw_data` module. `Nws` class offers ability to retrieve minimally processed data for a single location.  `SimpleNWS` class offers data caching and several other helpers for interpreting output.\n\n\n### Units for Observations in SimpleNWS\nNWS API does not expose all possible units for observations.  Known units are converted to the following:\n\n|unit type   | known NWS units| pynws unit |\n|------------|----------------|------------|\n|temperature | degF, degC     | Celsius    |\n|pressure    | Pa             | Pascal     |\n|speed       | m_s-1, km_h-1  | km_h-1     |\n|percent     | percent        | percent    |\n|angle       | degree_(angle) | degrees    |\n|distance    | m              | meter      |\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Python library to retrieve observations and forecasts from NWS/NOAA",
    "version": "1.8.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/MatthewFlamm/pynws/issues",
        "Repository": "https://github.com/MatthewFlamm/pynws"
    },
    "split_keywords": [
        "nws",
        " weather"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ce719804b824970f0a256af8045c0f0552037820e34580f88cbcb57d7677ad8",
                "md5": "f8bd76999e17629c50364b230c991546",
                "sha256": "56dd353153d25c1d8c9438e53432e90b1e3c826387ab8be4af19b2986dc86b65"
            },
            "downloads": -1,
            "filename": "pynws-1.8.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f8bd76999e17629c50364b230c991546",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16609,
            "upload_time": "2024-06-20T19:46:04",
            "upload_time_iso_8601": "2024-06-20T19:46:04.763498Z",
            "url": "https://files.pythonhosted.org/packages/5c/e7/19804b824970f0a256af8045c0f0552037820e34580f88cbcb57d7677ad8/pynws-1.8.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c131d73ae2ce29a6c7f6fdfa9556df0911721c19204e46880a60b94c92a52d9",
                "md5": "e897c324c379c9f2470880550807b450",
                "sha256": "6a5937bdbd97a7b762bad2fd3628a3b3a160ebac84905ef8dc25b2f162b586e8"
            },
            "downloads": -1,
            "filename": "pynws-1.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e897c324c379c9f2470880550807b450",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 43684,
            "upload_time": "2024-06-20T19:46:06",
            "upload_time_iso_8601": "2024-06-20T19:46:06.323528Z",
            "url": "https://files.pythonhosted.org/packages/6c/13/1d73ae2ce29a6c7f6fdfa9556df0911721c19204e46880a60b94c92a52d9/pynws-1.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-20 19:46:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MatthewFlamm",
    "github_project": "pynws",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pynws"
}
        
Elapsed time: 0.94456s