NSF Awards API简单客户端
nsfsearch的Python项目详细描述
nsfsearch:nsf awards api simple cli
这是google home api蓝图的一个应用程序。虽然许多端点可能会引起很多人的兴趣,但我使用了我最常用的端点,我认为它们最有用,并创建了一个命令行工具,供您搜索Google Home Mini设备,然后使用此工具与之交互并根据需要执行操作。
目录
安装
这假设您的系统中安装了本机python&pip,您可以通过转到终端(或windows命令提示符)并尝试
python
然后pip list
要安装nsfsearch:simple cli for google home&;mini可以使用两种方法安装。
pip install nsfsearch
或者您也可以尝试
git clone https://github.com/samapriya/nsfsearch.git
cd nsfsearch
python setup.py install
对于Linux,请使用sudo或尝试pip install nsfsearch --user
。
安装是一个可选步骤;应用程序也可以通过执行nsfsearch.py脚本直接运行。安装它的好处是nsfsearch可以作为任何命令行工具执行。我建议在虚拟环境中安装。如果不想安装,请浏览nsfsearch文件夹并尝试python nsfsearch.py
以获得相同的结果。
开始
如往常一样,要打印帮助:
NSF Awards API Simple CLI
positional arguments:
{keysearch,export,idsearch,result}
keysearch Searches for all projects with keywords
export Searches for all projects with keywords & export
idsearch Search using project ID
result Project outcome based on ID
optional arguments:
-h, --help show this help message and exit
要获得特定功能的帮助,只需使用help开关调用它,例如:nsfsearch result -h
。如果您没有安装nsfsearch,那么只需转到nsfsearch目录并运行python nsfsearch.py [arguments go here]
nsfsearch nsf awards api simple cli
该工具基于curret nsfaward search API,将来可能会有所更改。
按键搜索
这允许您基于关键字搜索获得所有奖项,您可以将关键字作为逗号分隔值传递,它将遍历列表并将结果打印到控制台。用法很简单
usage: nsfsearch keysearch [-h] [--wordlist WORDLIST [WORDLIST ...]]
optional arguments:
-h, --help show this help message and exit
--wordlist WORDLIST [WORDLIST ...]
Send comma seperated keywords
出口
此工具将keysearch结果导出到csv文件,而不是在控制台上打印出来。
usage: nsfsearch export [-h] [--wordlist WORDLIST [WORDLIST ...]]
[--file FILE]
optional arguments:
-h, --help show this help message and exit
--wordlist WORDLIST [WORDLIST ...]
Send comma seperated keywords
--file FILE Outfile CSV file with results
idSearch
使用项目ID查看特定的NSF项目。
usage: nsfsearch idsearch [-h] [--ids IDS]
optional arguments:
-h, --help show this help message and exit
--ids IDS Project ID
结果
使用项目ID获取NSF报告的任何项目结果。
usage: nsfsearch result [-h] [--ids IDS]
optional arguments:
-h, --help show this help message and exit
--ids IDS Project ID