py-subscribers is a util that retrieves a list of subscribers (watchers) for a given GitHub user and repo.
py-subscribers requires Python and the pip package. It also requires the following packages for usage and testing.
Usage:
- click
- requests
Testing:
- coveralls
- pylint
- pytest
- pytest-cov
- radon
- responses
-
Clone or download this repository.
-
Using
sudo, runpipwith theinstallcommand and the--editableoption.
sudo pip install --editable .[test]
-
Clone or download this repository.
-
Using
sudo, runpipwith theinstallcommand.
sudo pip install .
To retrieve a list of subscribers for all repos associated with a given user, run subscribers with the --user option.
subscribers --user <user>
To retrieve a list of subscribers associated with a given user and a given repo, run subscribers with the --user and --repo options.
subscribers --user <user> --repo <repo>
To write the retrieved list of subscribers to disk, run subscribers with the --write option.
subscribers --user <user> --write
subscribers --user <user> --repo <repo> --write
To retrieve a list of subscribers for all repos associated with a given user, run subscribers with the -u option.
subscribers -u <user>
To retrieve a list of subscribers associated with a given user and a given repo, run subscribers with the -u and -r options.
subscribers -u <user> -r <repo>
To write the retrieved list of subscribers to disk, run subscribers with the -w option.
subscribers -u <user> -w
subscribers -u <user> -r <repo> -w
- Run
radonwith themicommand and the--showoption.
radon mi --show subscribers
- Run
pylint.
pylint subscribers
- Run
pytestwith the-vv,--cov, and--cov-reportoptions.
pytest -vv --cov --cov-report=term-missing
py-subscribers makes unauthenticated requests to the GitHub API and is, therefore, subject to rate limits.