在GitHub上获取趋势回购/用户的库
gtrending的Python项目详细描述
gtrending
轻量级且易于使用的python库用于获取 趋势存储库和开发人员。依靠 github-trending-api 它是用JavaScript编写的,所以gtrending旨在填补这个空白 对于python。在
简单演示
fromgtrendingimportfetch_reposrepos=fetch_repos(language="python")# get the result as a dictforrepoinrepos:print(repo["fullname"])# full name (user/repo) of each repo
上面的例子将打印出所有的趋势Python项目 在GitHub上,今天的趋势,并打印他们的全名。在
要求
- Python 3.6或更高版本
安装
^{pr2}$API
fetch_repos()
Fetch trending repositories on GitHub
参数:
language (str, optional)
:按语言过滤,例如:pythonspoken_language_code (str, optional)
:口语,例如:en代表英语since (str, optional)
:时间范围,选择范围:[每日,每周,每月]。默认为“每日”
退货:
A list of dicts containing information for the trending repositories found
fetch_developers()
Fetch trending developers on GitHub
参数:
language (str, optional)
:编程语言,例如:pythonsince (str, optional)
:时间范围,从[每日、每周、每月]中选择。默认为“每日”
退货:
A list of dicts containing information for the trending repositories found
如果你喜欢这个库,请给它一个星,也许建议更多的功能!在
- 项目
标签: