按文件名搜索 github 文件内容

Dec*_*bal 4 github

我正在尝试识别 github 上特定 python 包的用例。

有没有一种方法可以搜索requirements.txt用 python 编写的存储库中的所有文件以查找字符串?

Ber*_*tel 5

从网络用户界面

在https://github.com/search中,输入:

django filename:requirements.txt language:python in:requirements.txt
Run Code Online (Sandbox Code Playgroud)

像这样在此输入图像描述

来自Github API

https://api.github.com/search/code?q=django+in:requirements.txt+filename:requirements.txt+language:python+org:openmicroscopy
Run Code Online (Sandbox Code Playgroud)

对于 Github API 的情况,您必须提供用户、组织或存储库

检查搜索代码文档

请注意,文件名过滤器和字符串数据不完全匹配