spacex api的python包装器
spacex-p的Python项目详细描述
spacex py
安装
pip install spacex-py
用法
这个包装器与SpaceX API匹配,所以使用起来相当容易。让我们看一些例子;
fromspacex_pyimportlaunches# Returns a tuplegot_launches,header=launches.get_launches()# PyLint being a pain about header? use:got_launches,_=launches.get_launches()print(got_launches)# Prints list: of launches
好吧,好吧,让我们使用一个查询来启动;
fromspacex_pyimportlaunchesgot_launches,_=launches.get_launches(site_id="ksc_lc_39a")print(got_launches)# Prints the launhces for the given site