Asynchronous wrapper for wttr.in API
Project description
aiopywttr
Asynchronous wrapper for wttr.in weather forecast API.
Synchronous version here.
Installation
python -m pip install -U aiopywttr pywttr-models
Example
This example prints the average temperature in New York today.
import asyncio
import aiopywttr
async def main():
wttr = aiopywttr.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
There is no documentation, just follow the example and code completion in your IDE.
All types of objects returned by the wttr.in API are in the aiopywttr.models
package.
Recommended IDEs
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiopywttr-2.2.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for aiopywttr-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a11787cd1139785f91d0c6fbb3a2c18c1feb9a721ecd86c95ad0067163726f8 |
|
MD5 | 07f09684ee0747399a4821c1fbd49a09 |
|
BLAKE2b-256 | 5caedb3d6cc0e71e7675093c4fb00589850f5f02851cf1c0a3a8c1870a9a8879 |