Is there a working OAuth library for Python 3? Is there a working OAuth library for Python 3? python-3.x python-3.x

Is there a working OAuth library for Python 3?


It looks like Requets_oauthlib works. Here's code I used that works in Python 3. I'm posting it because most of the example code I found used formats that I couldn't get working.

from requests_oauthlib import OAuth1    client_key = ''client_secret = ''resource_owner_key = ''resource_owner_secret = ''def query(queryurl):        headeroauth = OAuth1(client_key, client_secret, resource_owner_key,        resource_owner_secret, signature_type = 'auth_header')        return requests.get(queryurl, auth = headeroauth)query('http://website.com')


Author of rauth here: rauth is a client library which currently does not officially support Python 3.

However, we are working on it, and there's an active branch (aptly named "python-3") over at GitHub which works. You're free to use it, but bear in mind that things may change slightly when we officially release support for it later on. With that said, it would be great to have people out in the real world testing it so that we can make changes to accommodate the Python 3 ecosystem.

Also note: oauthlib is not a replacement for rauth and not a client library. It attempts to be a generic solution, much like python-oauth2 was, but it doesn't provide a client, unlike python-oauth2.