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

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

推荐PyPI第三方库


热门话题
IntelliJ中的java默认Maven项目结构不一致   java我希望链接(在帖子和页面上)在一些访问者加载时被自动点击   java如何使用单独的方法隐藏JButton并在新类中调用   java KStream leftJoin KStream具有相同的密钥   java图像在垂直滚动窗格视图端口中消失   java从指定的起始点开始以n的增量填充数组   java JLabel和JTextField不在swing表单中应用   java springboot mongo如果没有映像,请使用现有映像   类似C++映射的java容器   java如何在没有Valgrind错误的情况下调用JNI_CreateJavaVM?   java如何在安卓中运行后台服务   java onPostExecute不运行