Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Feb 10, 2023
1 parent 61943ff commit 66ca30c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
from pyipma.api import IPMA_API
from pyipma.location import Location

LAT, LON = 39.663396, -8.813334

import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)

async def main():
async with aiohttp.ClientSession() as session:
api = IPMA_API(session)

location = await Location.get(api, 40.6517, -8.6573, sea_stations=True)
location = await Location.get(api, LAT, LON, sea_stations=True)
print("Forecast for {}".format(location.name))
print("Nearest station is {}".format(location.station))
print("Nearest sea station is {}".format(location.sea_station_name))
Expand Down

0 comments on commit 66ca30c

Please sign in to comment.