Coverage for fingerprint_server_sdk / models / tampering_confidence.py: 92%

12 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-15 09:18 +0000

1""" 

2Server API 

3Fingerprint Server API allows you to get, search, and update Events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. 

4Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. 

5 

6The version of the OpenAPI document: 4 

7Contact: support@fingerprint.com 

8Generated by OpenAPI Generator (https://openapi-generator.tech) 

9 

10Do not edit the class manually. 

11""" # noqa: E501 

12 

13from __future__ import annotations 

14 

15import json 

16from enum import Enum 

17 

18from typing_extensions import Self 

19 

20 

21class TamperingConfidence(str, Enum): 

22 """ 

23 The confidence level indicates how certain Fingerprint is that the current request involves browser tampering. This confidence level is determined by evaluating multiple factors, such as heuristic rules, probabilistic anomaly detection, an anti detect browser ml model, and other relevant methods. It is conveyed as a string with possible values such as high, medium, or low In case of tampering: `true` * **High confidence**: heuristic anti detect browser signals and the ml model are triggered, or all of the methods are triggered. * **Medium confidence**: either the ml model triggers alone, the anomaly score triggers alone with or without the heuristic anti detect browser methods trigger. * **Low confidence**: only the heuristic anti detect methods are triggered. In case of tampering: `false` * **High confidence:** Strong signals suggest the user is not tampering with their request. 

24 """ 

25 

26 """ 

27 allowed enum values 

28 """ 

29 LOW = 'low' 

30 MEDIUM = 'medium' 

31 HIGH = 'high' 

32 

33 @classmethod 

34 def from_json(cls, json_str: str) -> Self: 

35 """Create an instance of TamperingConfidence from a JSON string""" 

36 return cls(json.loads(json_str))