public
Description: Python interface for talking to the github API
Clone URL: git://github.com/dustin/py-github.git
dustin (author)
Sat May 24 12:24:08 -0700 2008
commit  eef5ef3d043183ec3992426f67aa487854343bc2
tree    9ca28341a37b754aad5ae45a4968d15494f0078b
parent  599cd864ea345af6f9e0ee59aba840f13e5d201f
name age message
file .gitignore Thu Apr 10 09:19:56 -0700 2008 Working github user requestor. [dustin]
file README.markdown Sun Apr 13 22:16:41 -0700 2008 Updated the README since the API is currently c... [dustin]
directory data/ Sat May 24 12:22:32 -0700 2008 Support for the search API. [dustin]
file github.py Sat May 24 12:22:32 -0700 2008 Support for the search API. [dustin]
file githubsync.py Mon May 19 01:35:08 -0700 2008 githubsync: include info about ~/.github-private [dustin]
file githubtest.py Sat May 24 12:24:08 -0700 2008 Put docstrings on some of the undocstringed tests. [dustin]
README.markdown

What’s on Github?

This is a library that implements github’s API in python.

Part of the reason I wrote this was to have a simple way to keep local clones of my projects. Included is githubsync.py which does that for any given user (within the limitations of the github API, which currently limits you to public projects).

Example

This code (which happens to be main in git.py)

import sys
u = GitHub().user(sys.argv[1])
print "User:  %s (%s)" % (u.login, u.name)
for repo in [u.repos[k] for k in sorted(u.repos.keys())]:
    print "- %s" % repo.name
    print "  %s" % repo.url
    print "  %s" % "git://github.com/%s/%s.git" % (u.login, repo.name)

Yields this result:

User:  dustin (Dustin Sallings)
- app-hider
  http://github.com/dustin/app-hider
  git://github.com/dustin/app-hider.git
- buildwatch
  http://github.com/dustin/buildwatch
  git://github.com/dustin/buildwatch.git
- cache_fu
  http://github.com/dustin/cache_fu
  git://github.com/dustin/cache_fu.git
- diggwatch
  http://github.com/dustin/diggwatch
  git://github.com/dustin/diggwatch.git
- environ
  http://github.com/dustin/environ
  git://github.com/dustin/environ.git