Skip to main content

Watches for new public repositories

Project description

Poacher polls for newly created repositories, allowing you to obtain the URLs (or any other information provided by the Github API) for all new public repositories as they are created.


Install using pip:

pip install poacher


Full documentation for poacher Python API is here


For fun. It’s not something the Github API explicitly provides, and it’s a bit of a hack.

How does it work?

The Github API only allows you to fetch information about a specific repository by passing the repository ID, or of course the repository URL, however we’re interested in the ID in this case. There’s nothing really special about the repo ID, it’s just a number that gets incremented each time a repo is created. So the first ever repo has the ID “1”, and the 4,000th repo has the ID “4000”, etc.

This means we can determine the latest repo ID with a little brute force. Requests for a non-existent ID (or a private repo that your account cannot access) will fail, so with a simple binary search we can determine the highest repo ID currently in use, with a fairly small number of steps. Once we have this reference point, we can poll continuously for the next repo ID to be in use, and in this way “watch” the stream of new repos as they are being created.

Casual command-line usage

An example command-line program using poacher, poacher-monitor is provided with this package. poacher-monitor will print the clone URLs of new public repositories on as they are created. Basic usage looks like this;

$> poacher-monitor

Github username: eriknyquist
Github password:

Or, pass your username and password as arguments instead:

$> poacher-monitor -u github-username -p github-password

poacher-monitor has several command-line options. To see a full description of all options, run poacher-monitor -h

Project details

Download files

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

Source Distribution

poacher-0.2.tar.gz (5.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page