The OpenWeatherMap service provides free weather data and forecast API
suitable for any cartographic services like web and smartphones
applications. Ideology is inspired by OpenStreetMap and Wikipedia that
make information free and available for everybody. OpenWeatherMap
provides wide range of weather data such as map with current weather,
week forecast, precipitation, wind, clouds, data from weather Stations
and many others. Weather data is received from global Meteorological
broadcast services and more than 40 000 weather stations.
既然Google已经关闭了它的天气API,我建议查看一下OpenWeatherMap:
它不是一个Python库,但是非常容易使用,因为您可以得到JSON格式的结果。
下面是使用Requests的示例:
下面是一个使用PyOWM(OpenWeatherMap web API的Python包装器)的示例:
正式的API文档是here提供的。
要获得API密钥,请注册以打开天气图here
相关问题 更多 >
编程相关推荐