summaryrefslogtreecommitdiff
path: root/windy/__init__.py
blob: 346cecee3545733e842aa8c1ac9270e456ad0fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from pint import UnitRegistry
from requests import Session

import point_forecast


class Windy:
	def __init__(self, registry: UnitRegistry, session: Session = None, api: str = "https://api.windy.com/api"):
		self.registry = registry
		self.session = session or Session()
		self.api = api
		self._point_forecast = point_forecast.Endpoint("/point-forecast/v2")

	def point_forecast(self, request: point_forecast.Request):
		return self._point_forecast(self, request)