weatherly
v0.10.0
Weatherly는 Weatherapi.com에서 날씨 데이터를 검색하는 간단한 패키지입니다. 특정 위치에 대한 현재 및 역사적 기상 데이터에 액세스하기 위해 사용하기 쉬운 인터페이스를 제공합니다.
컴퓨터에 Weatherly를 설치하려면 Python Python 3.10 이상이 필요합니다. 파이썬 버전이 요구 사항을 충족하는 경우 다음과 같습니다.
# Windows
py -3 -m pip install -U weatherly
# MacOS / Linux
python3 -m pip install -U weatherly축하해요! 이제 Weatherly는 컴퓨터에서 사용할 준비가되었습니다.
import weatherly
client = weatherly . Client ( api_key = "your WeatherAPI key" )
# you can set language to all requests, or pass it manually
client . set_language ( "fr" ) # lang code
client . set_language ( "German" ) # language full name
# getting weather info
current_weather = client . get_current_weather ( query = "London" )
# getting forecast info
forecast = client . get_forecast_data ( query = "Paris" , days = 3 )
# historical data
history = client . get_historical_data ( query = "48.8567,2.3508" , date = "2010-01-01" ) # query could also be latitude,longitude
# marine data
marine = client . get_marine_data ( query = "Madrid" )