Skip to main content

GitHub Searcher

ghsearcher is a utility for searching GitHub from the command line.

Usage

  1. Install with pip pip install ghsearcher
  2. (Optional) you can either export an environment variable named "GH_TOKEN" or include it in a local .env file to ensure you can make the most requests. See "Creating a personal access token" for more information on how to do so.
usage: ghsearcher [-h] [-v] [--debug]
                  [-e {users,code,issues,commits,labels,repos,topics}] [-o OUTPUT_FILE]
                  -q QUERY [QUERY ...]

Search for things in GitHub

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --debug               Set this if you would like to see verbose logging.
  -e {users,code,issues,commits,labels,repos,topics}, --endpoint {users,code,issues,commits,labels,repos,topics}
                        Endpoint you would like to search
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        File name for where you want the JSON output to go. eg:
                        output/test will output a file in the output dir with the file
                        name test-2022-01-01.json
  -q QUERY [QUERY ...], --query QUERY [QUERY ...]
                        Query you would like to use to search

To learn about building queries you can check the following documentaiton for GitHubs search queries:

https://docs.github.com/en/rest/reference/search#constructing-a-search-query

Here is a simple example. The Kafka project is trying to better track if users are having issues with implementing their kafka into thier project so the create a data pipeline with the following to find issues in other repos featuring Kafka.

This example finds all issues including "Kafka" created on or after 2022-01-18 and outputting it to kafka_output_file-(todays date).json

# The source is a repo and it is running against the gh_dorks_test.txt file
ghsearcher -e issues -q "Kafka created:>2022-01-18" -o kafka_output_file

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghsearcher-0.0.4.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghsearcher-0.0.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file ghsearcher-0.0.4.tar.gz.

File metadata

  • Download URL: ghsearcher-0.0.4.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ghsearcher-0.0.4.tar.gz
Algorithm Hash digest
SHA256 292de3cabcd8c9ead182f36945d1445231bb93c46dbdc231be136f34f71574ba
MD5 b6334b4d2474f1f8b64828dceb1cdf7a
BLAKE2b-256 db5bf3c41444b018ac5cd96c171abf7973039c7425b1301beb914613d520820d

See more details on using hashes here.

File details

Details for the file ghsearcher-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ghsearcher-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ghsearcher-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2edc2e32f86080ec400eded3f15677c299661695052cfcb1241648f72dfeb9e4
MD5 38f8f57981034352984fe84952e9c111
BLAKE2b-256 347a8e470b0cdf713f9cd735768b0f7cc93caf880ddd3ba6cd8bc41f90e6a562

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page