telesign 3.0.0__py2.py3-none-any.whl → 4.0.0__py2.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.
- telesign/__init__.py +0 -2
- telesign/score.py +24 -14
- {telesign-3.0.0.dist-info → telesign-4.0.0.dist-info}/METADATA +7 -1
- telesign-4.0.0.dist-info/RECORD +12 -0
- telesign-3.0.0.dist-info/RECORD +0 -12
- {telesign-3.0.0.dist-info → telesign-4.0.0.dist-info}/LICENSE.txt +0 -0
- {telesign-3.0.0.dist-info → telesign-4.0.0.dist-info}/WHEEL +0 -0
- {telesign-3.0.0.dist-info → telesign-4.0.0.dist-info}/top_level.txt +0 -0
telesign/__init__.py
CHANGED
telesign/score.py
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
from __future__ import unicode_literals
|
|
2
|
-
|
|
3
1
|
from telesign.rest import RestClient
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
DETECT_HOST = "https://detect.telesign.com"
|
|
4
|
+
INTELLIGENCE_RESOURCE = "/intelligence/phone"
|
|
7
5
|
|
|
8
6
|
class ScoreClient(RestClient):
|
|
9
7
|
"""
|
|
10
|
-
|
|
8
|
+
ScoreClient for TeleSign Intelligence Cloud.
|
|
9
|
+
Supports POST /intelligence/phone endpoint(Cloud migration).
|
|
11
10
|
"""
|
|
12
11
|
|
|
13
|
-
def __init__(self, customer_id, api_key, **kwargs):
|
|
14
|
-
super(ScoreClient, self).__init__(customer_id, api_key, **kwargs)
|
|
12
|
+
def __init__(self, customer_id, api_key, rest_endpoint=DETECT_HOST, **kwargs):
|
|
13
|
+
super(ScoreClient, self).__init__(customer_id, api_key, rest_endpoint, **kwargs)
|
|
15
14
|
|
|
16
15
|
def score(self, phone_number, account_lifecycle_event, **params):
|
|
17
16
|
"""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Obtain a risk recommendation for a phone number using Telesign Intelligence Cloud API.
|
|
18
|
+
Required parameters:
|
|
19
|
+
- phone_number
|
|
20
|
+
- account_lifecycle_event ("create", "sign-in", "transact", "update", "delete")
|
|
21
|
+
Optional parameters: account_id, device_id, email_address, external_id, originating_ip, etc.
|
|
22
22
|
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if not phone_number:
|
|
24
|
+
raise ValueError("phone_number cannot be null or empty")
|
|
25
|
+
|
|
26
|
+
if not account_lifecycle_event:
|
|
27
|
+
raise ValueError("account_lifecycle_event cannot be null or empty")
|
|
28
|
+
|
|
29
|
+
params["phone_number"] = phone_number
|
|
30
|
+
params["account_lifecycle_event"] = account_lifecycle_event
|
|
31
|
+
|
|
32
|
+
return self.post(
|
|
33
|
+
INTELLIGENCE_RESOURCE,
|
|
34
|
+
**params
|
|
35
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: telesign
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: TeleSign SDK
|
|
5
5
|
Home-page: https://github.com/telesign/python_telesign
|
|
6
6
|
Author: TeleSign Corp.
|
|
@@ -21,6 +21,12 @@ Classifier: Programming Language :: Python :: 3.3
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.4
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.5
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.6
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
30
|
Requires-Dist: requests
|
|
25
31
|
|
|
26
32
|
.. image:: https://raw.github.com/TeleSign/python_telesign/master/python_banner.jpg
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
telesign/__init__.py,sha256=eDyQza1OnvJhC8uVA6AQ6Jq95mhuFNtCh9Dk9EZgAn4,310
|
|
2
|
+
telesign/messaging.py,sha256=v7l-eKUPqz7Nrwka0YNPMkC2TaoFUvQm3yp_djuTPu0,1367
|
|
3
|
+
telesign/phoneid.py,sha256=mk03NxL3wlaXpd8b-BB6q_SKfCxbtuTO19ayAHxmzz0,954
|
|
4
|
+
telesign/rest.py,sha256=AHNDyVZLa1vm2RWD4TSxr6uM4K50eH29C2Kjr3eCq8c,13911
|
|
5
|
+
telesign/score.py,sha256=VebZhJWSzneuMOoVvDKtv79tWlJqjffQ8gpzsH8wYVA,1326
|
|
6
|
+
telesign/util.py,sha256=stDxpL5ZQeGskE_OSGP04UFHs3ZP2ACaRpW1WyQGMHg,1624
|
|
7
|
+
telesign/voice.py,sha256=DJaWyQpun-T7LfNjpxpsUjupiv2ShW1jqoFQA-CE2-Y,1341
|
|
8
|
+
telesign-4.0.0.dist-info/LICENSE.txt,sha256=a--xZ4PCKUL5rpct8RrUC6ODU_8ZKIU51kJPfsA4HUs,1058
|
|
9
|
+
telesign-4.0.0.dist-info/METADATA,sha256=L8KulTzOsrRqXjL9ZZsFFsg3D6UUGln6fhpPdZXtCqg,4835
|
|
10
|
+
telesign-4.0.0.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
11
|
+
telesign-4.0.0.dist-info/top_level.txt,sha256=6LG7Jcr1jnpVhOWaIShoTdwYJn0QCfPhfudyVJNz1qg,9
|
|
12
|
+
telesign-4.0.0.dist-info/RECORD,,
|
telesign-3.0.0.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
telesign/__init__.py,sha256=D8kANX0FKxBD7-a7xQ21xPz3ojM2WAOK8lThGLtDZuE,367
|
|
2
|
-
telesign/messaging.py,sha256=v7l-eKUPqz7Nrwka0YNPMkC2TaoFUvQm3yp_djuTPu0,1367
|
|
3
|
-
telesign/phoneid.py,sha256=mk03NxL3wlaXpd8b-BB6q_SKfCxbtuTO19ayAHxmzz0,954
|
|
4
|
-
telesign/rest.py,sha256=AHNDyVZLa1vm2RWD4TSxr6uM4K50eH29C2Kjr3eCq8c,13911
|
|
5
|
-
telesign/score.py,sha256=Kceu6IrirN9SsuT1geEWs0QHAn6H9ZNFyIDVHcBJdwg,908
|
|
6
|
-
telesign/util.py,sha256=stDxpL5ZQeGskE_OSGP04UFHs3ZP2ACaRpW1WyQGMHg,1624
|
|
7
|
-
telesign/voice.py,sha256=DJaWyQpun-T7LfNjpxpsUjupiv2ShW1jqoFQA-CE2-Y,1341
|
|
8
|
-
telesign-3.0.0.dist-info/LICENSE.txt,sha256=a--xZ4PCKUL5rpct8RrUC6ODU_8ZKIU51kJPfsA4HUs,1058
|
|
9
|
-
telesign-3.0.0.dist-info/METADATA,sha256=FbEOaOQ1w0LnFmiKDKo3SnGJKZ56Lf19ltUg83dYZ0g,4532
|
|
10
|
-
telesign-3.0.0.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
11
|
-
telesign-3.0.0.dist-info/top_level.txt,sha256=6LG7Jcr1jnpVhOWaIShoTdwYJn0QCfPhfudyVJNz1qg,9
|
|
12
|
-
telesign-3.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|