Skip to main content

Asynchronous wrapper for wttr.in

Project description

aiopywttr

Build Status codecov Python Version License: MIT

Asynchronous wrapper for wttr.in weather forecast.

Synchronous version here.

Installation

python -m pip install aiopywttr

Example

This example prints the average temperature in New York today.

import asyncio

from aiopywttr import Wttr


async def main():
    wttr = Wttr("New York")
    forecast = await wttr.en()
    print(forecast.weather[0].avgtemp_c)


asyncio.run(main())

Other languages may also be used instead of en. For a complete list of supported languages, follow the code completion in your IDE.

Documentation

For an example of type annotations, see pywttr-models README.md.

There is no documentation, just follow the code completion in your IDE.

Recommended IDEs

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

aiopywttr-1.0.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

aiopywttr-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

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