ianchesal/keybase-python — pull request #1 by dametenshi (2014-05-01 06:26:56+00:00)
Title: Implemented KeybaseAdmin.login(passphrase) & other misc changes

A few small things:
* Alphabetized imports & added ```scrypt``` as a requirement
* Switched to the ```filecmp``` module for file comparison rather than rolling our own
* Made some comment changes that cleared some things up to my eyes (but they're comments, so feel free to take 'em or leave 'em)
* Defined ```get_json_from_url(url, params, method='get', timeout=10)``` since there will be a lot of making HTTP requests for JSON data. Might as well pull it into a function than copy/paste blocks of code between methods.
* Removed additional redundant code

The big change here is implementing ```KeybaseAdmin.login(passphrase)```. I've tested it with my own account and it works, but without mocking out the network/service or creating a test account with credentials in source, I'm not sure how we might approach testing this.

The other change is ```KeybaseAdmin.__user_object``` contains the raw JSON response from ```KeybaseAdmin.login(passphrase)```. The session cookie is stored in ```KeybaseAdmin.__session_cookie``` as the documentation describes, but that's just one subset of the entirety of ```KeybaseAdmin.__user_object```:

```python
>>> kbase = keybase.KeybaseAdmin('bpugh')
>>> kbase.login('passphrase')
>>> for each in kbase._KeybaseAdmin__user_object:
... print each
...
status
me
csrf_token
uid
guest_id
session
```