A free and asynchronous Weather API Wrapper.
Project description
python-weather
A free and asynchronous weather API wrapper made in python.
Simple Usage
# import the module
import python_weather
# declare the client. format defaults to metric system (celcius, km/h, etc.)
client = python_weather.Client(format=python_weather.IMPERIAL)
# fetch a weather forecast from a city
weather = await client.find("Washington DC")
# returns the current city temperature (int)
print(weather.current.temperature)
# get the weather forecast for a few days
for forecast in weather.forecast:
print(str(forecast.date), forecast.sky_text, forecast.temperature)
# close the wrapper once done
await client.close()
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
python-weather-0.2.1.tar.gz
(5.6 kB
view details)
File details
Details for the file python-weather-0.2.1.tar.gz.
File metadata
- Download URL: python-weather-0.2.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70ca96dab58c2484461fb1a711f132b83df8bc37bfe613dadd6ee2e124a4a4b5
|
|
| MD5 |
1dfaaf056d2b74823743bc1cb8ec59e1
|
|
| BLAKE2b-256 |
af408bb5918ded82e2a95dc88094e12324ededc18e57abf1d6fbe15e1e83cec4
|