[Go to site: main page, start]

Skip to main content

How to install

Add the fingerprint-server-sdk package as a dependency to your application:
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).
Python

Migration guide for Python SDK v9

Version 9 migrates the SDK from Server API v3 to v4. This is a breaking change. This section summarizes the most important changes from previous versions.

Package rename

The package changed from fingerprint_pro_server_api_sdk to fingerprint_server_sdk. Update the dependency you install and all of your imports.
Python

Region parameter

The region parameter is now a Region enum instead of a string.
Python

get_event return type

get_event now returns an Event with a flatter structure. Access fields directly instead of through the products wrapper.
Python

get_visits replaced by search_events

get_visits and get_related_visitors have been removed. Use search_events to retrieve the events for a visitor.
Python

Error handling

The KnownApiException class and its structured_error attribute have been removed. Catch ApiException and parse the response body with ErrorResponse.from_json. Version 9 also adds specific exception subclasses such as BadRequestException, TooManyRequestsException, ConflictException, and UnprocessableEntityException.
Python

Handling sealed client results from a v3 JavaScript agent

Python SDK v9 will fail to deserialize the decrypted payload of a sealed client result sent by a v3 JavaScript agent into an Event because the payload is an EventsGetResponse (i.e., the v3 event format), not an Event. To upgrade to Python SDK v9 without requiring a concurrent upgrade to the v4 JavaScript agent, you can fall back to using the Server API if unsealing the sealed client results fails. To enable this fallback path, your frontend must send the event ID alongside the sealed client results, as recommended by the sealed client results guide. Both unseal_event_response and get_event return an Event, so the fallback returns the same type.
Python

Documentation

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