skip to navigation
skip to content

bottle-auth 0.2.3

Bootle authentication, for Personal, Google, Twitter and facebook.

Latest Version: 0.3.3

Bottle plugin authentication, support with Google, Twitter and Facebook


from bottle import Bottle, redirect, request, run
from bottle.ext import auth
from bottle.ext.auth.decorator import login
from import Facebook, UserDenied
from import NegotiationError
from pprint import pformat

facebook = Facebook('fb-key', 'fb-secret',
                    '', 'email')

app = Bottle()
plugin = auth.AuthPlugin(facebook)

def login(auth):
    url = auth.redirect(request.environ)

def home():
    return "Home page"

def callback(provider):
        user = auth.get_user(request.environ)
    except UserDenied:
        return 'User denied'
    except NegotiationError:
        return 'Negotiation error, maybe expired stuff'

    return '<pre>{}</pre>'.format(pformat(user))

run(app=app, host='', port='3333', debug=True)


Create project

  1. Sign into your Google Apps account in your browser
  2. Visit in the same browser
  3. On the left menu, Create a new Project
  4. To start, you don’t need any Services, so select the API Access tab rom the left menu and “Create an OAuth 2.0 client ID…”
  5. Fill out the Client ID form for a web application and use localhost:8000 as your hostname
File Type Py Version Uploaded on Size
bottle-auth-0.2.3.tar.gz (md5) Source 2014-03-25 1KB
  • Downloads (All Versions):
  • 23 downloads in the last day
  • 106 downloads in the last week
  • 573 downloads in the last month