Giter Site home page Giter Site logo

montasim / github-stargazers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marius92mc/github-stargazers

0.0 0.0 0.0 76 KB

List stargazers and check if a user starred that repository.

Home Page: https://pypi.python.org/pypi/github-stargazers

License: MIT License

Shell 1.89% Python 98.11%

github-stargazers's Introduction


Build Status PyPI version HitCount tweet

List stargazers and check if a user starred that repository.

Install

It is recommended to be installed in a virtual environment with Python >= 3.6.

  • Install pipenv
$ pip3 install pipenv
  • After cd into a working directory, configure virtual environment and install github-stargazers
$ pipenv --python=python3.6
$ pipenv install github-stargazers

Usage

As a command-line app

$ pipenv run github-stargazers <username>/<repository> [OPTIONS]

where OPTIONS could be

--user <username>  GitHub username to see if it is a stargazer. 

If it's used without --user, it just shows repository's stargazers.

When it's used with --user, it shows if that user starred the repository or not.

Example:

$ pipenv run github-stargazers marius92mc/github-stargazers --user marius92mc

As an imported

from github_stargazers.github import GitHub

github = GitHub("yasoob/fb-messenger-bot")

print(github.get_all_stargazers())
print(github.is_stargazer("Jazzthedog"))

Running from source

Requirements

Getting started

  1. Install pipenv
$ pip3 install pipenv 
  1. Set Python 3.6 as the version used by pipenv to create the virtual environment
$ cd github_stargazers
$ pipenv --python=python3.6
  1. Install dependencies
$ pipenv install --dev

Run

First we need to install the package, according to setup.py instructions.

$ pipenv run python setup.py install

Then we can run the installed package inside pipenv.

$ pipenv run github-stargazers <username>/<repository> [OPTIONS]

where OPTIONS could be

--user <username>  GitHub username to see if it is a stargazer. 

Run autopep8, mypy, pylint for the changed files

$ ./autopep8.sh 
$ ./mypy.sh 
$ ./pylint.sh

Launch IPython console

$ pipenv run ipython

Tests

Run the unit-tests.

$ pipenv run pytest

or with more detailed output, like this $ pipenv run pytest -vv.

  • Debug failing tests
$ pipenv run pytest -vv -s -x --pdb --showlocals

For more details, see the pytest documentation.

github-stargazers's People

Contributors

marius92mc avatar ignacio-chiazzo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.