Need to use an OAuth-protected API in a Python webapp? oauth-dropins is for you! It’s a collection of drop-in OAuth client flows for many popular sites. It supports Facebook, Twitter, Google+, Instagram, Dropbox, Blogger, Tumblr, and WordPress.com, with more on the way. It also currently requires Google App Engine, but should support other platforms in the future.

Try the demo!

You can use oauth-dropins in your project with just a bit of code. For example, to use it for Facebook, just add these two lines to your WSGI application:

from oauth_dropins import facebook

application = webapp2.WSGIApplication([
  ('/facebook/start_oauth', facebook.StartHandler.to('/facebook/oauth_callback')),
  ('/facebook/oauth_callback', facebook.CallbackHandler.to('/next')),

Then map those URLs in your app.yaml and put your Facebook app‘s key and secret in facebook_app_id and facebook_app_secret files in your app’s root directory, and you’re good to go!

See the GitHub repo for more details. Happy hacking!


3 thoughts on “oauth-dropins

Leave a Reply

Your email address will not be published. Required fields are marked *