mpiannucci / ghsrch

Search github programmatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ghsrch

Search github programmatically.

Developing

Prerequisites

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.

Building and Running

Create a new virtual environment and install the requirements:

virtualenv -p python3 env
source env/bin/activate
pip install maturin

Rust Library

Test the rust library:

cargo test

Python Library

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

About

Search github programmatically


Languages

Language:Rust 83.6%Language:Python 16.4%