A client library for FusionAuth
Actively maintained. Last release 13 days ago, commits in 6 of the last 26 weeks. A safe choice.
pip install fusionauth-clientFusionAuth Python Client 
Intro
If you're integrating FusionAuth with a Python 3 application, this library will speed up your development time. Please also make sure to check our SDK Usage Suggestions page.
For additional information and documentation on FusionAuth refer to https://fusionauth.io.
Install
To install the FusionAuth Python Client package run:
pip install fusionauth-client
This library can be found on PyPI at https://pypi.org/project/fusionauth-client/.
Examples
Set Up
First, you have to make sure you have a running FusionAuth instance. If you don't have one already, the easiest way to install FusionAuth is via Docker, but there are other ways. By default, it'll be running on localhost:9011.
Then, you have to create an API Key in the admin UI to allow calling API endpoints.
You are now ready to use this library.
Create the Client
Include the package in your code by using the following statement.
from fusionauth.fusionauth_client import FusionAuthClient
Now you're ready to begin making requests to FusionAuth. You will need to supply an API key you created in FusionAuth, the following example assumes an API key of 6b87a398-39f2-4692-927b-13188a81a9a3.
client = FusionAuthClient('6b87a398-39f2-4692-927b-13188a81a9a3', 'http://localhost:9011')
Error Handling
After every request is made, you need to check for any errors and handle them. To avoid cluttering things up, we'll omit the error handling in the next examples, but you should do something like the following.
Create an Application
To create an Application, use the method.