regula-facesdk-webclient 6.4.198.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of regula-facesdk-webclient might be problematic. Click here for more details.

Files changed (133) hide show
  1. regula/__init__.py +0 -0
  2. regula/facesdk/__init__.py +0 -0
  3. regula/facesdk/webclient/__init__.py +15 -0
  4. regula/facesdk/webclient/ext/__init__.py +5 -0
  5. regula/facesdk/webclient/ext/api/__init__.py +3 -0
  6. regula/facesdk/webclient/ext/api/group_api.py +36 -0
  7. regula/facesdk/webclient/ext/api/match_api.py +46 -0
  8. regula/facesdk/webclient/ext/api/person_api.py +46 -0
  9. regula/facesdk/webclient/ext/api/sdk.py +28 -0
  10. regula/facesdk/webclient/ext/api/search_api.py +17 -0
  11. regula/facesdk/webclient/ext/common.py +7 -0
  12. regula/facesdk/webclient/ext/models/__init__.py +6 -0
  13. regula/facesdk/webclient/ext/models/detect_request.py +32 -0
  14. regula/facesdk/webclient/ext/models/match_image.py +19 -0
  15. regula/facesdk/webclient/ext/models/match_request.py +34 -0
  16. regula/facesdk/webclient/gen/__init__.py +27 -0
  17. regula/facesdk/webclient/gen/api/__init__.py +3 -0
  18. regula/facesdk/webclient/gen/api/diagnostics_api.py +162 -0
  19. regula/facesdk/webclient/gen/api/group_api.py +1040 -0
  20. regula/facesdk/webclient/gen/api/healthcheck_api.py +283 -0
  21. regula/facesdk/webclient/gen/api/liveness_2_0_api.py +168 -0
  22. regula/facesdk/webclient/gen/api/liveness_api.py +424 -0
  23. regula/facesdk/webclient/gen/api/match_api.py +463 -0
  24. regula/facesdk/webclient/gen/api/person_api.py +1345 -0
  25. regula/facesdk/webclient/gen/api/search_api.py +177 -0
  26. regula/facesdk/webclient/gen/api_client.py +695 -0
  27. regula/facesdk/webclient/gen/apis/__init__.py +22 -0
  28. regula/facesdk/webclient/gen/configuration.py +446 -0
  29. regula/facesdk/webclient/gen/exceptions.py +159 -0
  30. regula/facesdk/webclient/gen/model/__init__.py +5 -0
  31. regula/facesdk/webclient/gen/model/add_image_to_person_request.py +205 -0
  32. regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +204 -0
  33. regula/facesdk/webclient/gen/model/add_image_to_person_response.py +262 -0
  34. regula/facesdk/webclient/gen/model/attribute_config.py +120 -0
  35. regula/facesdk/webclient/gen/model/attribute_config_list.py +92 -0
  36. regula/facesdk/webclient/gen/model/crop.py +208 -0
  37. regula/facesdk/webclient/gen/model/detect_request.py +204 -0
  38. regula/facesdk/webclient/gen/model/detect_request_attributes.py +120 -0
  39. regula/facesdk/webclient/gen/model/detect_response.py +147 -0
  40. regula/facesdk/webclient/gen/model/detect_response_all_of.py +120 -0
  41. regula/facesdk/webclient/gen/model/detect_result.py +231 -0
  42. regula/facesdk/webclient/gen/model/detection.py +258 -0
  43. regula/facesdk/webclient/gen/model/detection_attributes.py +148 -0
  44. regula/facesdk/webclient/gen/model/detection_face.py +260 -0
  45. regula/facesdk/webclient/gen/model/detection_quality.py +234 -0
  46. regula/facesdk/webclient/gen/model/device_info.py +231 -0
  47. regula/facesdk/webclient/gen/model/face_align_type_quality.py +109 -0
  48. regula/facesdk/webclient/gen/model/face_attribute.py +133 -0
  49. regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +109 -0
  50. regula/facesdk/webclient/gen/model/face_image_quality_groups.py +118 -0
  51. regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +118 -0
  52. regula/facesdk/webclient/gen/model/face_image_quality_status.py +103 -0
  53. regula/facesdk/webclient/gen/model/face_quality_config_name.py +238 -0
  54. regula/facesdk/webclient/gen/model/face_quality_scenarios.py +121 -0
  55. regula/facesdk/webclient/gen/model/face_quality_status.py +103 -0
  56. regula/facesdk/webclient/gen/model/face_rectangular.py +92 -0
  57. regula/facesdk/webclient/gen/model/face_sdk_result.py +121 -0
  58. regula/facesdk/webclient/gen/model/face_sdk_result_code.py +217 -0
  59. regula/facesdk/webclient/gen/model/faces_response.py +286 -0
  60. regula/facesdk/webclient/gen/model/faces_response_all_of.py +148 -0
  61. regula/facesdk/webclient/gen/model/filter_op.py +100 -0
  62. regula/facesdk/webclient/gen/model/filter_search_request.py +176 -0
  63. regula/facesdk/webclient/gen/model/group.py +206 -0
  64. regula/facesdk/webclient/gen/model/group_all_of.py +150 -0
  65. regula/facesdk/webclient/gen/model/group_page.py +178 -0
  66. regula/facesdk/webclient/gen/model/group_page_all_of.py +122 -0
  67. regula/facesdk/webclient/gen/model/group_response.py +150 -0
  68. regula/facesdk/webclient/gen/model/group_to_create.py +180 -0
  69. regula/facesdk/webclient/gen/model/image.py +290 -0
  70. regula/facesdk/webclient/gen/model/image_fields.py +258 -0
  71. regula/facesdk/webclient/gen/model/image_fields_image.py +204 -0
  72. regula/facesdk/webclient/gen/model/image_page.py +176 -0
  73. regula/facesdk/webclient/gen/model/image_page_all_of.py +120 -0
  74. regula/facesdk/webclient/gen/model/image_source.py +115 -0
  75. regula/facesdk/webclient/gen/model/liveness_transaction.py +334 -0
  76. regula/facesdk/webclient/gen/model/liveness_type.py +100 -0
  77. regula/facesdk/webclient/gen/model/match_and_search_request.py +178 -0
  78. regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +178 -0
  79. regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +148 -0
  80. regula/facesdk/webclient/gen/model/match_and_search_response.py +233 -0
  81. regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +206 -0
  82. regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +176 -0
  83. regula/facesdk/webclient/gen/model/match_image.py +205 -0
  84. regula/facesdk/webclient/gen/model/match_image_detection.py +178 -0
  85. regula/facesdk/webclient/gen/model/match_image_result.py +316 -0
  86. regula/facesdk/webclient/gen/model/match_request.py +204 -0
  87. regula/facesdk/webclient/gen/model/match_request_output_image_params.py +148 -0
  88. regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +212 -0
  89. regula/facesdk/webclient/gen/model/match_response.py +205 -0
  90. regula/facesdk/webclient/gen/model/match_response_all_of.py +178 -0
  91. regula/facesdk/webclient/gen/model/operation_log.py +206 -0
  92. regula/facesdk/webclient/gen/model/output_image_params.py +146 -0
  93. regula/facesdk/webclient/gen/model/page.py +150 -0
  94. regula/facesdk/webclient/gen/model/person.py +318 -0
  95. regula/facesdk/webclient/gen/model/person_all_of.py +206 -0
  96. regula/facesdk/webclient/gen/model/person_created_response.py +178 -0
  97. regula/facesdk/webclient/gen/model/person_fields.py +234 -0
  98. regula/facesdk/webclient/gen/model/person_to_update_fields.py +206 -0
  99. regula/facesdk/webclient/gen/model/person_with_images.py +346 -0
  100. regula/facesdk/webclient/gen/model/person_with_images_all_of.py +122 -0
  101. regula/facesdk/webclient/gen/model/persons_page.py +176 -0
  102. regula/facesdk/webclient/gen/model/persons_page_all_of.py +120 -0
  103. regula/facesdk/webclient/gen/model/process_param.py +226 -0
  104. regula/facesdk/webclient/gen/model/process_param_attributes.py +120 -0
  105. regula/facesdk/webclient/gen/model/quality_config.py +154 -0
  106. regula/facesdk/webclient/gen/model/quality_config_list.py +92 -0
  107. regula/facesdk/webclient/gen/model/quality_detail.py +234 -0
  108. regula/facesdk/webclient/gen/model/quality_details_groups.py +202 -0
  109. regula/facesdk/webclient/gen/model/quality_request.py +146 -0
  110. regula/facesdk/webclient/gen/model/recognize_image.py +346 -0
  111. regula/facesdk/webclient/gen/model/recognize_image_all_of.py +150 -0
  112. regula/facesdk/webclient/gen/model/resize_options.py +178 -0
  113. regula/facesdk/webclient/gen/model/rgb.py +92 -0
  114. regula/facesdk/webclient/gen/model/search_bad_params.py +172 -0
  115. regula/facesdk/webclient/gen/model/search_detection.py +398 -0
  116. regula/facesdk/webclient/gen/model/search_parameters.py +174 -0
  117. regula/facesdk/webclient/gen/model/search_parameters_create_person.py +177 -0
  118. regula/facesdk/webclient/gen/model/search_person.py +372 -0
  119. regula/facesdk/webclient/gen/model/search_person_all_of.py +148 -0
  120. regula/facesdk/webclient/gen/model/search_request.py +338 -0
  121. regula/facesdk/webclient/gen/model/search_request_all_of.py +178 -0
  122. regula/facesdk/webclient/gen/model/search_result.py +313 -0
  123. regula/facesdk/webclient/gen/model/search_result_all_of.py +122 -0
  124. regula/facesdk/webclient/gen/model/transaction_config.py +92 -0
  125. regula/facesdk/webclient/gen/model/transaction_info.py +344 -0
  126. regula/facesdk/webclient/gen/model/update_group.py +150 -0
  127. regula/facesdk/webclient/gen/model_utils.py +2037 -0
  128. regula/facesdk/webclient/gen/models/__init__.py +96 -0
  129. regula/facesdk/webclient/gen/rest.py +346 -0
  130. regula_facesdk_webclient-6.4.198.dev0.dist-info/METADATA +73 -0
  131. regula_facesdk_webclient-6.4.198.dev0.dist-info/RECORD +133 -0
  132. regula_facesdk_webclient-6.4.198.dev0.dist-info/WHEEL +5 -0
  133. regula_facesdk_webclient-6.4.198.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,283 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Regula Face SDK Web API
5
+
6
+ <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
7
+
8
+ The version of the OpenAPI document: 6.2.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ from __future__ import absolute_import
14
+
15
+ import re # noqa: F401
16
+
17
+ # python 2 and python 3 compatibility library
18
+ import six
19
+
20
+ from regula.facesdk.webclient.gen.api_client import ApiClient
21
+ from regula.facesdk.webclient.gen.exceptions import ( # noqa: F401
22
+ ApiTypeError,
23
+ ApiValueError
24
+ )
25
+
26
+
27
+ class HealthcheckApi(object):
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None):
35
+ if api_client is None:
36
+ api_client = ApiClient()
37
+ self.api_client = api_client
38
+
39
+ def healthz(self, **kwargs): # noqa: E501
40
+ """Server healthcheck # noqa: E501
41
+
42
+ This method makes a synchronous HTTP request by default. To make an
43
+ asynchronous HTTP request, please pass async_req=True
44
+
45
+ >>> thread = api.healthz(async_req=True)
46
+ >>> result = thread.get()
47
+
48
+ :param x_request_id: Request header label.
49
+ :type x_request_id: str
50
+ :param async_req: Whether to execute the request asynchronously.
51
+ :type async_req: bool, optional
52
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
53
+ be returned without reading/decoding response
54
+ data. Default is True.
55
+ :type _preload_content: bool, optional
56
+ :param _request_timeout: timeout setting for this request. If one
57
+ number provided, it will be total request
58
+ timeout. It can also be a pair (tuple) of
59
+ (connection, read) timeouts.
60
+ :return: Returns the result object.
61
+ If the method is called asynchronously,
62
+ returns the request thread.
63
+ :rtype: DeviceInfo
64
+ """
65
+ kwargs['_return_http_data_only'] = True
66
+ return self.healthz_with_http_info(**kwargs) # noqa: E501
67
+
68
+ def healthz_with_http_info(self, **kwargs): # noqa: E501
69
+ """Server healthcheck # noqa: E501
70
+
71
+ This method makes a synchronous HTTP request by default. To make an
72
+ asynchronous HTTP request, please pass async_req=True
73
+
74
+ >>> thread = api.healthz_with_http_info(async_req=True)
75
+ >>> result = thread.get()
76
+
77
+ :param x_request_id: Request header label.
78
+ :type x_request_id: str
79
+ :param async_req: Whether to execute the request asynchronously.
80
+ :type async_req: bool, optional
81
+ :param _return_http_data_only: response data without head status code
82
+ and headers
83
+ :type _return_http_data_only: bool, optional
84
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
85
+ be returned without reading/decoding response
86
+ data. Default is True.
87
+ :type _preload_content: bool, optional
88
+ :param _request_timeout: timeout setting for this request. If one
89
+ number provided, it will be total request
90
+ timeout. It can also be a pair (tuple) of
91
+ (connection, read) timeouts.
92
+ :param _request_auth: set to override the auth_settings for an a single
93
+ request; this effectively ignores the authentication
94
+ in the spec for a single request.
95
+ :type _request_auth: dict, optional
96
+ :return: Returns the result object.
97
+ If the method is called asynchronously,
98
+ returns the request thread.
99
+ :rtype: tuple(DeviceInfo, status_code(int), headers(HTTPHeaderDict))
100
+ """
101
+
102
+ local_var_params = locals()
103
+
104
+ all_params = [
105
+ 'x_request_id',
106
+ ]
107
+ all_params.extend(
108
+ [
109
+ 'async_req',
110
+ '_return_http_data_only',
111
+ '_preload_content',
112
+ '_request_timeout',
113
+ '_request_auth'
114
+ ]
115
+ )
116
+
117
+ for key, val in six.iteritems(local_var_params['kwargs']):
118
+ if key not in all_params:
119
+ raise ApiTypeError(
120
+ "Got an unexpected keyword argument '%s'"
121
+ " to method healthz" % key
122
+ )
123
+ local_var_params[key] = val
124
+ del local_var_params['kwargs']
125
+
126
+ collection_formats = {}
127
+
128
+ path_params = {}
129
+
130
+ query_params = []
131
+
132
+ header_params = {}
133
+ if 'x_request_id' in local_var_params:
134
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
135
+
136
+ form_params = []
137
+ local_var_files = {}
138
+
139
+ body_params = None
140
+ # HTTP header `Accept`
141
+ header_params['Accept'] = self.api_client.select_header_accept(
142
+ ['application/json']) # noqa: E501
143
+
144
+ # Authentication setting
145
+ auth_settings = [] # noqa: E501
146
+
147
+ return self.api_client.call_api(
148
+ '/api/healthz', 'GET',
149
+ path_params,
150
+ query_params,
151
+ header_params,
152
+ body=body_params,
153
+ post_params=form_params,
154
+ files=local_var_files,
155
+ response_type='DeviceInfo', # noqa: E501
156
+ auth_settings=auth_settings,
157
+ async_req=local_var_params.get('async_req'),
158
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
159
+ _preload_content=local_var_params.get('_preload_content', True),
160
+ _request_timeout=local_var_params.get('_request_timeout'),
161
+ collection_formats=collection_formats,
162
+ _request_auth=local_var_params.get('_request_auth'))
163
+
164
+ def readyz(self, **kwargs): # noqa: E501
165
+ """License healthcheck # noqa: E501
166
+
167
+ This method makes a synchronous HTTP request by default. To make an
168
+ asynchronous HTTP request, please pass async_req=True
169
+
170
+ >>> thread = api.readyz(async_req=True)
171
+ >>> result = thread.get()
172
+
173
+ :param x_request_id: Request header label.
174
+ :type x_request_id: str
175
+ :param async_req: Whether to execute the request asynchronously.
176
+ :type async_req: bool, optional
177
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
178
+ be returned without reading/decoding response
179
+ data. Default is True.
180
+ :type _preload_content: bool, optional
181
+ :param _request_timeout: timeout setting for this request. If one
182
+ number provided, it will be total request
183
+ timeout. It can also be a pair (tuple) of
184
+ (connection, read) timeouts.
185
+ :return: Returns the result object.
186
+ If the method is called asynchronously,
187
+ returns the request thread.
188
+ :rtype: None
189
+ """
190
+ kwargs['_return_http_data_only'] = True
191
+ return self.readyz_with_http_info(**kwargs) # noqa: E501
192
+
193
+ def readyz_with_http_info(self, **kwargs): # noqa: E501
194
+ """License healthcheck # noqa: E501
195
+
196
+ This method makes a synchronous HTTP request by default. To make an
197
+ asynchronous HTTP request, please pass async_req=True
198
+
199
+ >>> thread = api.readyz_with_http_info(async_req=True)
200
+ >>> result = thread.get()
201
+
202
+ :param x_request_id: Request header label.
203
+ :type x_request_id: str
204
+ :param async_req: Whether to execute the request asynchronously.
205
+ :type async_req: bool, optional
206
+ :param _return_http_data_only: response data without head status code
207
+ and headers
208
+ :type _return_http_data_only: bool, optional
209
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
210
+ be returned without reading/decoding response
211
+ data. Default is True.
212
+ :type _preload_content: bool, optional
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the authentication
219
+ in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :return: Returns the result object.
222
+ If the method is called asynchronously,
223
+ returns the request thread.
224
+ :rtype: None
225
+ """
226
+
227
+ local_var_params = locals()
228
+
229
+ all_params = [
230
+ 'x_request_id',
231
+ ]
232
+ all_params.extend(
233
+ [
234
+ 'async_req',
235
+ '_return_http_data_only',
236
+ '_preload_content',
237
+ '_request_timeout',
238
+ '_request_auth'
239
+ ]
240
+ )
241
+
242
+ for key, val in six.iteritems(local_var_params['kwargs']):
243
+ if key not in all_params:
244
+ raise ApiTypeError(
245
+ "Got an unexpected keyword argument '%s'"
246
+ " to method readyz" % key
247
+ )
248
+ local_var_params[key] = val
249
+ del local_var_params['kwargs']
250
+
251
+ collection_formats = {}
252
+
253
+ path_params = {}
254
+
255
+ query_params = []
256
+
257
+ header_params = {}
258
+ if 'x_request_id' in local_var_params:
259
+ header_params['X-RequestID'] = local_var_params['x_request_id'] # noqa: E501
260
+
261
+ form_params = []
262
+ local_var_files = {}
263
+
264
+ body_params = None
265
+ # Authentication setting
266
+ auth_settings = [] # noqa: E501
267
+
268
+ return self.api_client.call_api(
269
+ '/api/readyz', 'GET',
270
+ path_params,
271
+ query_params,
272
+ header_params,
273
+ body=body_params,
274
+ post_params=form_params,
275
+ files=local_var_files,
276
+ response_type=None, # noqa: E501
277
+ auth_settings=auth_settings,
278
+ async_req=local_var_params.get('async_req'),
279
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
280
+ _preload_content=local_var_params.get('_preload_content', True),
281
+ _request_timeout=local_var_params.get('_request_timeout'),
282
+ collection_formats=collection_formats,
283
+ _request_auth=local_var_params.get('_request_auth'))
@@ -0,0 +1,168 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Regula Face SDK Web API
5
+
6
+ <a href=\"https://regulaforensics.com/products/face-recognition-sdk/ \" target=\"_blank\">Regula Face SDK</a> is a cross-platform biometric verification solution for a digital identity verification process and image quality assurance. The SDK enables convenient and reliable face capture on the client side (mobile, web, and desktop) and further processing on the client or server side. The Face SDK includes the following features: * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-detection\" target=\"_blank\">Face detection and image quality assessment</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-comparison-11\" target=\"_blank\">Face match (1:1)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#face-identification-1n\" target=\"_blank\">Face search (1:N)</a> * <a href=\"https://docs.regulaforensics.com/develop/face-sdk/overview/introduction/#liveness-assessment\" target=\"_blank\">Liveness detection</a> Here is the <a href=\"https://github.com/regulaforensics/FaceSDK-web-openapi \" target=\"_blank\">OpenAPI specification on GitHub</a>. ### Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
7
+
8
+ The version of the OpenAPI document: 6.2.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ from __future__ import absolute_import
14
+
15
+ import re # noqa: F401
16
+
17
+ # python 2 and python 3 compatibility library
18
+ import six
19
+
20
+ from regula.facesdk.webclient.gen.api_client import ApiClient
21
+ from regula.facesdk.webclient.gen.exceptions import ( # noqa: F401
22
+ ApiTypeError,
23
+ ApiValueError
24
+ )
25
+
26
+
27
+ class Liveness20Api(object):
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None):
35
+ if api_client is None:
36
+ api_client = ApiClient()
37
+ self.api_client = api_client
38
+
39
+ def get_liveness_transaction_info(self, transaction_id, **kwargs): # noqa: E501
40
+ """liveness check # noqa: E501
41
+
42
+ To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person's selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn't meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`. # noqa: E501
43
+ This method makes a synchronous HTTP request by default. To make an
44
+ asynchronous HTTP request, please pass async_req=True
45
+
46
+ >>> thread = api.get_liveness_transaction_info(transaction_id, async_req=True)
47
+ >>> result = thread.get()
48
+
49
+ :param transaction_id: ID of the current liveness transaction. (required)
50
+ :type transaction_id: str
51
+ :param async_req: Whether to execute the request asynchronously.
52
+ :type async_req: bool, optional
53
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
54
+ be returned without reading/decoding response
55
+ data. Default is True.
56
+ :type _preload_content: bool, optional
57
+ :param _request_timeout: timeout setting for this request. If one
58
+ number provided, it will be total request
59
+ timeout. It can also be a pair (tuple) of
60
+ (connection, read) timeouts.
61
+ :return: Returns the result object.
62
+ If the method is called asynchronously,
63
+ returns the request thread.
64
+ :rtype: TransactionInfo
65
+ """
66
+ kwargs['_return_http_data_only'] = True
67
+ return self.get_liveness_transaction_info_with_http_info(transaction_id, **kwargs) # noqa: E501
68
+
69
+ def get_liveness_transaction_info_with_http_info(self, transaction_id, **kwargs): # noqa: E501
70
+ """liveness check # noqa: E501
71
+
72
+ To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person's selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn't meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`. # noqa: E501
73
+ This method makes a synchronous HTTP request by default. To make an
74
+ asynchronous HTTP request, please pass async_req=True
75
+
76
+ >>> thread = api.get_liveness_transaction_info_with_http_info(transaction_id, async_req=True)
77
+ >>> result = thread.get()
78
+
79
+ :param transaction_id: ID of the current liveness transaction. (required)
80
+ :type transaction_id: str
81
+ :param async_req: Whether to execute the request asynchronously.
82
+ :type async_req: bool, optional
83
+ :param _return_http_data_only: response data without head status code
84
+ and headers
85
+ :type _return_http_data_only: bool, optional
86
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
87
+ be returned without reading/decoding response
88
+ data. Default is True.
89
+ :type _preload_content: bool, optional
90
+ :param _request_timeout: timeout setting for this request. If one
91
+ number provided, it will be total request
92
+ timeout. It can also be a pair (tuple) of
93
+ (connection, read) timeouts.
94
+ :param _request_auth: set to override the auth_settings for an a single
95
+ request; this effectively ignores the authentication
96
+ in the spec for a single request.
97
+ :type _request_auth: dict, optional
98
+ :return: Returns the result object.
99
+ If the method is called asynchronously,
100
+ returns the request thread.
101
+ :rtype: tuple(TransactionInfo, status_code(int), headers(HTTPHeaderDict))
102
+ """
103
+
104
+ local_var_params = locals()
105
+
106
+ all_params = [
107
+ 'transaction_id',
108
+ ]
109
+ all_params.extend(
110
+ [
111
+ 'async_req',
112
+ '_return_http_data_only',
113
+ '_preload_content',
114
+ '_request_timeout',
115
+ '_request_auth'
116
+ ]
117
+ )
118
+
119
+ for key, val in six.iteritems(local_var_params['kwargs']):
120
+ if key not in all_params:
121
+ raise ApiTypeError(
122
+ "Got an unexpected keyword argument '%s'"
123
+ " to method get_liveness_transaction_info" % key
124
+ )
125
+ local_var_params[key] = val
126
+ del local_var_params['kwargs']
127
+ # verify the required parameter 'transaction_id' is set
128
+ if self.api_client.client_side_validation and ('transaction_id' not in local_var_params or # noqa: E501
129
+ local_var_params['transaction_id'] is None): # noqa: E501
130
+ raise ApiValueError("Missing the required parameter `transaction_id` when calling `get_liveness_transaction_info`") # noqa: E501
131
+
132
+ collection_formats = {}
133
+
134
+ path_params = {}
135
+
136
+ query_params = []
137
+ if 'transaction_id' in local_var_params and local_var_params['transaction_id'] is not None: # noqa: E501
138
+ query_params.append(('transactionId', local_var_params['transaction_id'])) # noqa: E501
139
+
140
+ header_params = {}
141
+
142
+ form_params = []
143
+ local_var_files = {}
144
+
145
+ body_params = None
146
+ # HTTP header `Accept`
147
+ header_params['Accept'] = self.api_client.select_header_accept(
148
+ ['application/json']) # noqa: E501
149
+
150
+ # Authentication setting
151
+ auth_settings = [] # noqa: E501
152
+
153
+ return self.api_client.call_api(
154
+ '/api/v2/liveness', 'GET',
155
+ path_params,
156
+ query_params,
157
+ header_params,
158
+ body=body_params,
159
+ post_params=form_params,
160
+ files=local_var_files,
161
+ response_type='TransactionInfo', # noqa: E501
162
+ auth_settings=auth_settings,
163
+ async_req=local_var_params.get('async_req'),
164
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
165
+ _preload_content=local_var_params.get('_preload_content', True),
166
+ _request_timeout=local_var_params.get('_request_timeout'),
167
+ collection_formats=collection_formats,
168
+ _request_auth=local_var_params.get('_request_auth'))