diff options
Diffstat (limited to 'github3/core.py')
-rw-r--r-- | github3/core.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/github3/core.py b/github3/core.py index 0fdffd4..77c5c9e 100644 --- a/github3/core.py +++ b/github3/core.py @@ -22,9 +22,14 @@ def no_auth(): return gh -def basic_auth(): +def basic_auth(username, password): """Returns an authenticated Github object, via HTTP Basic.""" + def enable_auth(*args, **kwargs): + kwargs['auth'] = (username, password) + return args, kwargs + gh = Github() + gh._requests_pre_hook = enable_auth return gh
\ No newline at end of file |