
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
(python -m) pip install pyweather
from pyweather import *
#QWFreeAPI 1-3三个和风天气开发版免费API
#LocateMe_China myip.ipip.net中国IP查询
#LocateMe和LocateMe_en myip.la国际IP查询
addr=LocateMe_China()
loc=QWFreeAPI1.locate(addr)
print(QWFreeAPI1.weather(loc))
#将字符串转为整数
#获取字符串中第一个合法的整数
#123d -> 123
#asdf1234ghjk -> 1234
parse_int(s) -> int
#如果使用热点,定位可能失败,返回空字符串
#国内快速定位(https://www.ipip.net/myip.html)
LocateMe_China() -> str
#国际中文定位,稍慢(https://www.myip.la/)
LocateMe() -> str
#国际英文定位(https://www.myip.la/)
LocateMe_en() -> str
#天气
PointWeather(time=None,temp=None,feelslike=None,wea=None,weaicon=None,winddir=None,winddeg=None,windscale=None,windspeed=None,humidity=None,vis=None,aqi=None)
get_icon() -> bytes #获取天气图标
add(pw) -> None #添加天气数据,pw为另一个PointWeather对象
#可以使用str和repr
#和风天气API(不支持签名)
QWeatherAPI(key)
locate(loc) -> str #定位城市代码
weather(cid) -> PointWeather #根据城市代码查询天气
#免费开发版API:QWFreeAPI 1-3
#tianqiapi.com API
TianqiAPI(appid,appsecret)
weather(cid=None,city=None,ip=None) -> PointWeather #查询天气,默认查询本地天气
#免费API:TianqiFreeAPI
#心知天气API(只支持温度和天气种类,不支持签名)
SeniverseAPI(key)
weather(loc) -> PointWeather #根据城市查询天气
#免费API:SeniverseFreeAPI 1-3
FAQs
Weather API Lib
We found that timeweather demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.