Search github programmatically.
You will also need a a github personal access token. You can create one with the instructions here. Save this token and do not save it in a public place.
Create a new virtual environment and install the requirements:
virtualenv -p python3 env
source env/bin/activate
pip install maturin
Test the rust library:
cargo test
Build the python library:
maturin develop
Then you can verify that the library is importable:
import ghsrch
Or you can run the example command line tool, after setting your github token as an environment variable:
export GITHUB_TOKEN=<your token>
ghsrchr --help
# example search for rust code using the zarr keyword
python example/ghsrchr.py code --language=rust zarr
# example search commits
python example/ghsrchr.py commits --repo=pydata/xarray cache