Python Server API SDK

Fingerprint Server Python SDK is an easy way to interact with our Server API from your Python application. You can retrieve visitor history or individual identification events.

How to install

Add fingerprint_pro_server_api_sdk as a dependency to your application via pip from GitHub or PyPI.

pip install git+https://github.com/fingerprintjs/fingerprint-pro-server-api-python-sdk.git
pip install fingerprint_pro_server_api_sdk

Initialize the client instance and use it to make API requests. You need to specify your secret API key and region (if it is not US/Global).

import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import EventResponse
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException

configuration = fingerprint_pro_server_api_sdk.Configuration(
  api_key="<SECRET_API_KEY>",
  # region="eu"
)
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)

# Get visit history of a specific visitor
try:
    visits: Response = api_instance.get_visits("<visitorId>", limit=10)
    print(visits)
except ApiException as e:
    print("Exception when getting visits: %s\n" % e)

# Get a specific identification event
try:
    event: EventResponse = api_instance.get_event("<requestId>")
    print(event)
except ApiException as e:
    print("Exception when getting an event: %s\n" % e)

Documentation

You can find the full documentation in the official GitHub repository.