Python Server API SDK
Using Fingerprint Pro Server API Python SDK
This open-source library improves the experience for projects using Python. It simplifies communication with the Fingerprint Pro Server API which is used for getting information about visitors and individual events in a server environment. Server API can be used for data exports, decision-making, and data analysis scenarios.
Example Use
- Add
fingerprint_pro_server_api_sdk
as a dependency to your application viapip
.
# Install from GitHub
pip install git+https://github.com/fingerprintjs/fingerprint-pro-server-api-python-sdk.git
# Install from PyPI
pip install fingerprint_pro_server_api_sdk
- Include the secret API key and region in the configuration and use the client instance for API requests.
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException
# Configure API key authorization and region
configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY", region="us")
# Create an instance of the API class
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
visitor_id = "visitor_id_example"
try:
api_response: Response = api_instance.get_visits(visitor_id)
print(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->visitors_visitor_id_get: %s\n" % e)
- Additionally, you can also apply filters for the
get_visits
function.
api_response: Response = api_instance.get_visits(
visitor_id,
limit=2,
before="<timeStamp>",
request_id="<request_id>",
linked_id="<linked_id>"
)
- For webhooks, you can use the generated type object.
from fingerprint_pro_server_api_sdk import WebhookVisit
Documentation
You can find the full documentation in the official GitHub repository.
Updated 7 days ago