Installation¶
python-social-auth is very modular library looking to provide the basics tools to implement social authentication / authorization in Python projects. For that reason, the project is split in smaller components that focus on providing a simpler functionality. Some components are:
- social-auth-core Core library that the rest depends on, this contains the basic functionality to stablish an authentication/authorization flow with the diferent supported providers.
- social-auth-storage-sqlalchemy, social-auth-storage-peewee, social-auth-storage-mongoengine Different storage solutions that can be reused accross the supported frameworks or newer implementations.
- social-auth-app-django, social-auth-app-django-mongoengine Django framework integration
- social-auth-app-flask, social-auth-app-flask-sqlalchemy, social-auth-app-flask-mongoengine, social-auth-app-flask-peewee Flask framework integration
- social-auth-app-pyramid Pyramid framework integration
- social-auth-app-cherrypy Cherrypy framework integration
- social-auth-app-tornado Tornado framework integration
- social-auth-app-webpy Webpy framework integration
Dependencies¶
Dependencies are properly defined in the requirements files, the
setup.py
script will determine the environment where it’s
installed and sort between Python2 or Python3 packages if
needed. There are some extras
defined to install the corresponding
dependencies since they require to build extensions that, unless used,
are undesired.
- OpenIdConnect support requires the use of the
openidconnect
extra. - SAML support requires the use of
saml
extra.
There’s also the all
extra that will install all the extra options.
Several backends demands application registration on their corresponding sites and other dependencies like sqlalchemy on Flask and Webpy.
Get a copy¶
From pypi:
$ pip install social-auth-<component>
Or:
$ easy_install social-auth-<component>
Or:
$ cd social-auth-<component>
$ sudo python setup.py install
Using the extras
options¶
To enable any of the extras
options to bring the dependencines for
OpenIdConnect, or SAML, or both:
$ pip install "social-auth-core[openidconnect]"
$ pip install "social-auth-core[saml]"
$ pip install "social-auth-core[all]"