hyper-sdk 2.7.1__tar.gz → 2.9.0__tar.gz

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.
Files changed (31) hide show
  1. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/PKG-INFO +1 -1
  2. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai_input.py +6 -9
  3. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/kasada_input.py +4 -2
  4. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/session.py +3 -18
  5. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/session_async.py +3 -18
  6. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk.egg-info/PKG-INFO +1 -1
  7. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/pyproject.toml +1 -1
  8. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/LICENSE +0 -0
  9. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/README.md +0 -0
  10. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/__init__.py +0 -0
  11. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai/__init__.py +0 -0
  12. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai/pixel.py +0 -0
  13. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai/script_path.py +0 -0
  14. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai/sec_cpt.py +0 -0
  15. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/akamai/stop_signal.py +0 -0
  16. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/datadome/__init__.py +0 -0
  17. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/datadome/parse.py +0 -0
  18. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/datadome_input.py +0 -0
  19. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/incapsula/__init__.py +0 -0
  20. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/incapsula/dynamic.py +0 -0
  21. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/incapsula/utmvc.py +0 -0
  22. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/incapsula_input.py +0 -0
  23. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/kasada/__init__.py +0 -0
  24. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/kasada/parse.py +0 -0
  25. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/shared.py +0 -0
  26. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk/trustdecision_input.py +0 -0
  27. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk.egg-info/SOURCES.txt +0 -0
  28. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk.egg-info/dependency_links.txt +0 -0
  29. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk.egg-info/requires.txt +0 -0
  30. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/hyper_sdk.egg-info/top_level.txt +0 -0
  31. {hyper_sdk-2.7.1 → hyper_sdk-2.9.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper_sdk
3
- Version: 2.7.1
3
+ Version: 2.9.0
4
4
  Summary: Hyper Solutions Python SDK
5
5
  License: MIT License
6
6
 
@@ -1,12 +1,13 @@
1
1
  class SensorInput:
2
- def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str, acceptLanguage: str, context: str, script_hash="", dynamic_values=""):
2
+ def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str, acceptLanguage: str,
3
+ context: str, script: str, scriptUrl: str):
3
4
  self.abck = abck
4
5
  self.bmsz = bmsz
5
6
  self.version = version
6
7
  self.page_url = page_url
7
8
  self.user_agent = user_agent
8
- self.script_hash = script_hash
9
- self.dynamic_values = dynamic_values
9
+ self.script = script
10
+ self.scriptUrl = scriptUrl
10
11
  self.context = context
11
12
  self.ip = ip
12
13
  self.acceptLanguage = acceptLanguage
@@ -21,13 +22,9 @@ class PixelInput:
21
22
  self.ip = ip
22
23
 
23
24
 
24
- class DynamicInput:
25
- def __init__(self, script: str):
26
- self.script = script
27
-
28
-
29
25
  class SbsdInput:
30
- def __init__(self, index: int, user_agent: str, uuid: str, page_url: str, o_cookie: str, script: str, acceptLanguage: str, ip: str):
26
+ def __init__(self, index: int, user_agent: str, uuid: str, page_url: str, o_cookie: str, script: str,
27
+ acceptLanguage: str, ip: str):
31
28
  self.index = index
32
29
  self.user_agent = user_agent
33
30
  self.uuid = uuid
@@ -1,15 +1,17 @@
1
1
  class KasadaPowInput:
2
- def __init__(self, st: int, ct: str, domain: str, work_time: int = None):
2
+ def __init__(self, st: int, ct: str, fc: str, domain: str, work_time: int = None):
3
3
  # St is the x-kpsdk-st value returned by the /tl POST request
4
4
  self.st = st
5
5
  # Ct is the x-kpsdk-ct value returned by the /tl POST request
6
6
  self.ct = ct
7
+ # fc is the x-kpsdk-fc value returned by the /mfc GET request, if used by the site
8
+ self.fc = fc
7
9
  # WorkTime can be used to pre-generate POW strings
8
10
  self.work_time = work_time
9
11
  self.domain = domain
10
12
 
11
13
  def to_dict(self):
12
- result = {"st": self.st, "ct": self.ct, "domain": self.domain}
14
+ result = {"st": self.st, "ct": self.ct, "fc": self.fc, "domain": self.domain}
13
15
  if self.work_time is not None:
14
16
  result["workTime"] = self.work_time
15
17
  return result
@@ -7,7 +7,7 @@ import json
7
7
  import zstandard as zstd
8
8
 
9
9
  from .shared import generate_signature, build_headers, validate_response
10
- from .akamai_input import SensorInput, PixelInput, DynamicInput, SbsdInput
10
+ from .akamai_input import SensorInput, PixelInput, SbsdInput
11
11
  from .kasada_input import KasadaPowInput, KasadaPayloadInput
12
12
  from .datadome_input import DataDomeSliderInput, DataDomeInterstitialInput, DataDomeTagsInput
13
13
  from .incapsula_input import UtmvcInput, ReeseInput
@@ -63,8 +63,8 @@ class Session:
63
63
  'bmsz': input_data.bmsz,
64
64
  'version': input_data.version,
65
65
  'pageUrl': input_data.page_url,
66
- 'scriptHash': input_data.script_hash,
67
- 'dynamicValues': input_data.dynamic_values,
66
+ 'script': input_data.script,
67
+ 'scriptUrl': input_data.scriptUrl,
68
68
  'context': input_data.context,
69
69
  'ip': input_data.ip,
70
70
  'acceptLanguage': input_data.acceptLanguage,
@@ -107,21 +107,6 @@ class Session:
107
107
  'index': input_data.index,
108
108
  })
109
109
 
110
- def parse_v3_dynamic(self, input_data: DynamicInput) -> str:
111
- """
112
- Returns the dynamic values required to generate sensor data for V3 dynamic with Hyper Solutions API.
113
-
114
- Args:
115
- input_data (DynamicInput): An instance of DynamicInput containing the necessary data for parsing the script.
116
-
117
- Returns:
118
- str: Dynamic values as a string.
119
- """
120
- sensor_endpoint = "https://akm.hypersolutions.co/v3dynamic"
121
- return self._send_request(sensor_endpoint, {
122
- 'script': input_data.script,
123
- })
124
-
125
110
  def generate_pixel_data(self, input_data: PixelInput) -> str:
126
111
  """
127
112
  Returns the pixel data using the Hyper Solutions API.
@@ -7,7 +7,7 @@ import json
7
7
  import zstandard as zstd
8
8
 
9
9
  from .shared import generate_signature, build_headers, validate_response
10
- from .akamai_input import SensorInput, PixelInput, DynamicInput, SbsdInput
10
+ from .akamai_input import SensorInput, PixelInput, SbsdInput
11
11
  from .kasada_input import KasadaPowInput, KasadaPayloadInput
12
12
  from .datadome_input import DataDomeSliderInput, DataDomeInterstitialInput, DataDomeTagsInput
13
13
  from .incapsula_input import UtmvcInput, ReeseInput
@@ -67,8 +67,8 @@ class SessionAsync:
67
67
  'bmsz': input_data.bmsz,
68
68
  'version': input_data.version,
69
69
  'pageUrl': input_data.page_url,
70
- 'scriptHash': input_data.script_hash,
71
- 'dynamicValues': input_data.dynamic_values,
70
+ 'script': input_data.script,
71
+ 'scriptUrl': input_data.scriptUrl,
72
72
  'context': input_data.context,
73
73
  'ip': input_data.ip,
74
74
  'acceptLanguage': input_data.acceptLanguage,
@@ -111,21 +111,6 @@ class SessionAsync:
111
111
  'index': input_data.index,
112
112
  })
113
113
 
114
- async def parse_v3_dynamic(self, input_data: DynamicInput) -> str:
115
- """
116
- Returns the dynamic values required to generate sensor data for V3 dynamic with Hyper Solutions API.
117
-
118
- Args:
119
- input_data (DynamicInput): An instance of DynamicInput containing the necessary data for parsing the script.
120
-
121
- Returns:
122
- str: Dynamic values as a string.
123
- """
124
- sensor_endpoint = "https://akm.hypersolutions.co/v3dynamic"
125
- return await self._send_request(sensor_endpoint, {
126
- 'script': input_data.script,
127
- })
128
-
129
114
  async def generate_pixel_data(self, input_data: PixelInput) -> str:
130
115
  """
131
116
  Returns the pixel data using the Hyper Solutions API.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper_sdk
3
- Version: 2.7.1
3
+ Version: 2.9.0
4
4
  Summary: Hyper Solutions Python SDK
5
5
  License: MIT License
6
6
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hyper_sdk"
7
- version = "2.7.1"
7
+ version = "2.9.0"
8
8
  description = "Hyper Solutions Python SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
File without changes
File without changes
File without changes
File without changes