This is the documentation of the development version, check the Stable Version documentation.


This part of the documentation covers the installation of Authlib, just like any other software package needs to be installed first.

$ pip install Authlib

Installing Authlib is simple with pip:

$ pip install Authlib

It will also install the dependencies:

  • cryptography


You may enter problems when installing cryptography, check its official document at

Using Authlib with requests:

$ pip install Authlib requests

Using Authlib with httpx:

$ pip install Authlib httpx

Using Authlib with Flask:

$ pip install Authlib Flask

Using Authlib with Django:

$ pip install Authlib Django

Using Authlib with Starlette:

$ pip install Authlib httpx Starlette

Changed in version v0.12: “requests” is an optional dependency since v0.12. If you want to use Authlib client, you have to install “requests” by yourself:

$ pip install Authlib requests

Get the Source Code

Authlib is actively developed on GitHub, where the code is always available.

You can either clone the public repository:

$ git clone git://

Download the tarball:

$ curl -OL

Or, download the zipball:

$ curl -OL

Once you have a copy of the source, you can embed it in your Python package, or install it into your site-packages easily:

$ cd authlib
$ pip install .