Reputation: 3
I am using pygithub3 wrapper to interact with GITHUB API. I am trying to get the list of contributors from a git repo, following is my code:
from pygithub3 import Github
gh = Github()
s = gh.repos.list_contributors(user='poise',repo='python')
print(s)
output: pygithub3.core.result.smart.Result object at 0x7ff40510ffd0
Upvotes: 0
Views: 834
Reputation: 11
As per pygithub3 documentation list_contributors returns a Result. For you to be able to view the result, you need to consume it using one of the following formats:
Refer to the documentation for details: (http://pygithub3.readthedocs.org/en/latest/result.html)
The list option is straight forward. Just add .all() when printing the result to get the list of contributors.
from pygithub3 import Github
gh = Github()
s = gh.repos.list_contributors(user='poise',repo='python')
print(s.all())
Output:
<User (jtimberman)>
<User (coderanger)>
<User (schisamo)>
<User (sethvargo)>
<User (damm)>
<User (guilhem)>
<User (joestump)>
<User (ka2n)>
<User (PrajaktaPurohit)>
<User (nathenharvey)>
<User (someara)>
<User (benjaminws)>
<User (captnswing)>
<User (jjhuff)>
<User (andreacampi)>
<User (rody)>
<User (tk0miya)>
<User (comandrei)>
<User (btm)>
<User (spazm)>
<User (akiernan)>
<User (chr4)>
<User (e100)>
<User (garrypolley)>
<User (kamaradclimber)>
<User (hectcastro)>
<User (hltbra)>
<User (spheromak)>
<User (rgbkrk)>
<User (mal)>
<User (Frick)>
<User (miketheman)>
<User (nathanph)>
<User (paulczar)>
<User (petecheslock)>
<User (dexterous)>
<User (stevendanna)>
<User (viralshah)>
<User (chantra)>
<User (tdcarrol)>
Upvotes: 1