sopel气象模块的工作再实现

sopel-modules.weather的Python项目详细描述


PyPI versionBuild StatusCoverage Status

sopel天气

sopel weather是sopel的天气查找模块。

由于雅虎在2019年1月3日否决了他们的天气api,因此有必要重新实现天气模块

用法

# Allows the user to set their current location
.setlocation london # Sets location by city name
.setlocation w2643743 # Sets location by WOEID (We are prepending w in front of WOEIDs because they collide with zips)
.setlocation 98101 # Sets location by zip code

# Gets a 24h forecast
.forecast # Only works if setlocation has been previously run
.forecast seattle, us
.forecast london

# Gets the current weather
.weather # Only works if setlocation has been previously run
.weather seattle, us
.weather london

要求

API键

https://openweathermap.org/api

python需求

requests
sopel

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java允许具有不同父类的类扩展类,而无需多重继承   java如何创建动态化的JScrollPane w/JPanel作为客户端?   java如何组织和命名包   在Java中读取属性文件   java无法解释的Android意图行为   在Java中动态执行多个BPEL文件的部署   ssl Java 6 SNI(服务器名称指示)?   java我们可以使用Robot框架自动化web和移动应用程序来执行并行执行   java for star pettern的循环   java为什么BinaryReader在线程中,从netty读取错误的数据包?   在java中将华氏度转换为摄氏度   使用Spark和java处理空值和引号编写CSV文件   Java中已排序日期到块的列表   visual studio代码VSCode Java不是linting或自动完成局部变量,而是自动完成Java快捷方式,如“sysout”