|
1 | | -Python github3 wrapper |
2 | | -======================= |
| 1 | +Pygithub3 |
| 2 | +========== |
| 3 | + |
| 4 | +Pygithub3 is a wrapper to the `Github API v3 <http://developer.github.com/v3/>`_, |
| 5 | +written in Python. |
| 6 | + |
| 7 | +It has been developed with extensibility in mind, because the ``API`` is in a |
| 8 | +beta state, trying to achieve a very loosly coupled software. |
| 9 | + |
| 10 | +It should be very easy to extend to support new ``requests`` and ``resources``, |
| 11 | +because each is managed by itself. |
| 12 | + |
| 13 | + |
| 14 | +Fast install |
| 15 | +------------- |
| 16 | +:: |
| 17 | + |
| 18 | + pip install pygithub3 |
| 19 | + |
| 20 | +Fast example |
| 21 | +------------- |
| 22 | +:: |
| 23 | + |
| 24 | + from pygithub3.github import Github |
| 25 | + |
| 26 | + gh = Github() |
| 27 | + copitux = gh.users.get('copitux') |
| 28 | + copitux_followers = gh.users.followers.list('copitux') |
| 29 | + copitux_followers.all() # lazy iterator that must be consumed |
| 30 | + |
| 31 | + gh.users.set_credentials(login='github_user', password='github_password') |
| 32 | + # or: gh.users.set_token('token_code') |
| 33 | + github_user = gh.users.get() |
| 34 | + gh.users.followers.set_credentials(login='another_user', password='another_password') |
| 35 | + another_user_followers = gh.users.followers.list().all() |
| 36 | + """ Continue... |
| 37 | + gh.users.emails.set_credentials( ... |
| 38 | + github_user_emails = gh.users.emails.list() |
| 39 | + |
| 40 | + Each service (users, emails, followers ...) is isolated from the rest. Maybe in |
| 41 | + future releases the behaviour of Github component changes to share configuration |
| 42 | + """ |
3 | 43 |
|
4 | 44 | Achievements |
5 | 45 | ------------- |
6 | 46 |
|
7 | | -- The hard part (Client, Service[s], Request[s], ResultIterator, Resource[s]). Now I have to join this pieces :P |
| 47 | +- The core |
| 48 | +- `User service <http://developer.github.com/v3/users/>`_ |
| 49 | + |
| 50 | +TODO |
| 51 | +----- |
8 | 52 |
|
9 | | -TODO (in order as far as possible) |
10 | | ------------------------------------- |
| 53 | +- `Repo service <http://developer.github.com/v3/repos/>`_ |
| 54 | +- Docs |
11 | 55 |
|
12 | | -- Tests |
13 | | -- Doc (Sphinx?) |
14 | | -- Continue developing services (it must be now easy and fast) |
15 | | -- ... |
| 56 | +Contribute |
| 57 | +----------- |
16 | 58 |
|
17 | | -Install |
18 | | ----------- |
| 59 | +1. Fork the `repository <https://github.com/copitux/python-github3>`_ |
| 60 | +2. Write a test to cover new feature or to reproduce bug |
| 61 | +3. Code with `pep8 <http://www.python.org/dev/peps/pep-0008/>`_ rules |
| 62 | +3. Push to ``develop`` branch |
19 | 63 |
|
20 | | -$ pip install -e git+https://github.com/copitux/python-github3 |
| 64 | +**Note**: I use `nose <http://readthedocs.org/docs/nose/en/latest/>`_ test environment. ``pip install nose`` |
0 commit comments