Add oauth support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Microfiber |
Fix Released
|
High
|
Jason Gerard DeRose |
Bug Description
I wrote Microfiber as a way to force myself to really learn the CouchDB REST API, and as an excuse to write some Python3 code. But turns out Microfiber is a better fit for dmedia and Novacut than python-couchdb... so the missing piece we need is OAuth support so we can talk to desktopcouch.
One slight wrinkle is that we're trying to move all the Novacut components to Python3, but it's not clear whether there is a maintained Python3 oauth package yet. Googling found this from 2 years ago:
http://
Microfiber is currently Python3-only, but it wont be much work to make it work with Python2 also. In fact, I'm going to do this today. So as a stop gap, we could have OAuth support when using Microfiber under Python2, which means we can transition dmedia to Microfiber ASAP.
Related branches
- Michael Chang (community): Approve
- microfiber dev: Pending requested
-
Diff: 1002 lines (+338/-292)4 files modifiedbenchmark_microfiber.py (+1/-0)
microfiber.py (+130/-130)
setup.py (+6/-1)
test_microfiber.py (+201/-161)
Changed in microfiber: | |
status: | Triaged → In Progress |
assignee: | nobody → Jason Gerard DeRose (jderose) |
Changed in microfiber: | |
milestone: | 0.2 → 11.09 |
Changed in microfiber: | |
status: | In Progress → Fix Committed |
Changed in microfiber: | |
status: | Fix Committed → Fix Released |
So after a lot of research and looking at both the Python `oauth` and `oauth2` code, I decided to see how much work it would be to implement just enough OAuth support for Microfiber to talk to desktopcouch... and turns out, it just took 37 lines, so I went for it.
This is much better for us as right now neither `oauth` or `oauth2` is actively maintained for Python3. This seems the closest:
https:/ /github. com/simplegeo/ python- oauth2/ pull/51
So in the long run, these 37 lines are a lot less work that possibly maintaining Python3 oauth2, packaging it, etc. `oauth` and `oauth2` are complete OAuth solutions, but we only need a fraction of it.
Here are the said 37 lines:
http:// bazaar. launchpad. net/~jderose/ microfiber/ oauth/view/ head:/microfibe r.py#L200