A Clima Tempo API Python Wrapper
Project description
ClimaTempoPy
A Clima Tempo API Python Wrapper
Retrieving Brazilian current weather and forecast prevision from Clima Tempo site.
- Example
import sys
from climatempopy import ClimaTempo
from aiohttp import ClientSession
import asyncio
YOUR_CLIMA_TEMPO_TOKEN =''
LOCALE_ID = ''
async def main():
async with ClientSession() as session:
climatempo = ClimaTempo(session, YOUR_CLIMA_TEMPO_TOKEN , LOCALE_ID)
await climatempo.update_current_weather()
await climatempo.update_72_hours_forecast()
await climatempo.update_15_days_forecast()
print(climatempo.current)
print(climatempo.forecast_72_hours)
print(climatempo.forecast_15_days)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
- Scripts of this lib
$ pip3 install climatempopy
$ get_localeID YOUR_CLIMATEMPO_TOKEN LAT LON
$ get_weather_by_localeID YOUR_CLIMATEMPO_TOKEN LOCALE_ID
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
climatempopy-0.0.7.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for climatempopy-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc9455e4eaacb05411e57a3bbc1c09e479fb5fc6c136ff40a3bec6c4c4b3142 |
|
MD5 | 34d7febdfa22bc2262e08de21a64c43c |
|
BLAKE2b-256 | 822e2feb16a8ea6b9328a68adc6b22ab52cf5cf53dcc2f9adfc1364da16f039e |