parsek-cdp 0.1.0__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.
Files changed (242) hide show
  1. parsek_cdp/__init__.py +55 -0
  2. parsek_cdp/_logging.py +49 -0
  3. parsek_cdp/cdp/__init__.py +247 -0
  4. parsek_cdp/cdp/accessibility/__init__.py +15 -0
  5. parsek_cdp/cdp/accessibility/events.py +35 -0
  6. parsek_cdp/cdp/accessibility/functions.py +202 -0
  7. parsek_cdp/cdp/accessibility/types.py +235 -0
  8. parsek_cdp/cdp/animation/__init__.py +15 -0
  9. parsek_cdp/cdp/animation/events.py +52 -0
  10. parsek_cdp/cdp/animation/functions.py +140 -0
  11. parsek_cdp/cdp/animation/types.py +113 -0
  12. parsek_cdp/cdp/audits/__init__.py +15 -0
  13. parsek_cdp/cdp/audits/events.py +21 -0
  14. parsek_cdp/cdp/audits/functions.py +95 -0
  15. parsek_cdp/cdp/audits/types.py +1051 -0
  16. parsek_cdp/cdp/autofill/__init__.py +15 -0
  17. parsek_cdp/cdp/autofill/events.py +27 -0
  18. parsek_cdp/cdp/autofill/functions.py +64 -0
  19. parsek_cdp/cdp/autofill/types.py +108 -0
  20. parsek_cdp/cdp/backgroundservice/__init__.py +15 -0
  21. parsek_cdp/cdp/backgroundservice/events.py +40 -0
  22. parsek_cdp/cdp/backgroundservice/functions.py +59 -0
  23. parsek_cdp/cdp/backgroundservice/types.py +63 -0
  24. parsek_cdp/cdp/bluetoothemulation/__init__.py +15 -0
  25. parsek_cdp/cdp/bluetoothemulation/events.py +70 -0
  26. parsek_cdp/cdp/bluetoothemulation/functions.py +247 -0
  27. parsek_cdp/cdp/bluetoothemulation/types.py +120 -0
  28. parsek_cdp/cdp/browser/__init__.py +15 -0
  29. parsek_cdp/cdp/browser/events.py +46 -0
  30. parsek_cdp/cdp/browser/functions.py +350 -0
  31. parsek_cdp/cdp/browser/types.py +158 -0
  32. parsek_cdp/cdp/cachestorage/__init__.py +15 -0
  33. parsek_cdp/cdp/cachestorage/events.py +13 -0
  34. parsek_cdp/cdp/cachestorage/functions.py +126 -0
  35. parsek_cdp/cdp/cachestorage/types.py +89 -0
  36. parsek_cdp/cdp/cast/__init__.py +15 -0
  37. parsek_cdp/cdp/cast/events.py +38 -0
  38. parsek_cdp/cdp/cast/functions.py +77 -0
  39. parsek_cdp/cdp/cast/types.py +23 -0
  40. parsek_cdp/cdp/console/__init__.py +15 -0
  41. parsek_cdp/cdp/console/events.py +22 -0
  42. parsek_cdp/cdp/console/functions.py +36 -0
  43. parsek_cdp/cdp/console/types.py +30 -0
  44. parsek_cdp/cdp/css/__init__.py +15 -0
  45. parsek_cdp/cdp/css/events.py +79 -0
  46. parsek_cdp/cdp/css/functions.py +788 -0
  47. parsek_cdp/cdp/css/types.py +742 -0
  48. parsek_cdp/cdp/debugger/__init__.py +15 -0
  49. parsek_cdp/cdp/debugger/events.py +164 -0
  50. parsek_cdp/cdp/debugger/functions.py +663 -0
  51. parsek_cdp/cdp/debugger/types.py +171 -0
  52. parsek_cdp/cdp/deviceaccess/__init__.py +15 -0
  53. parsek_cdp/cdp/deviceaccess/events.py +30 -0
  54. parsek_cdp/cdp/deviceaccess/functions.py +54 -0
  55. parsek_cdp/cdp/deviceaccess/types.py +28 -0
  56. parsek_cdp/cdp/deviceorientation/__init__.py +15 -0
  57. parsek_cdp/cdp/deviceorientation/events.py +13 -0
  58. parsek_cdp/cdp/deviceorientation/functions.py +35 -0
  59. parsek_cdp/cdp/deviceorientation/types.py +10 -0
  60. parsek_cdp/cdp/dom/__init__.py +15 -0
  61. parsek_cdp/cdp/dom/events.py +228 -0
  62. parsek_cdp/cdp/dom/functions.py +1033 -0
  63. parsek_cdp/cdp/dom/types.py +293 -0
  64. parsek_cdp/cdp/domdebugger/__init__.py +15 -0
  65. parsek_cdp/cdp/domdebugger/events.py +13 -0
  66. parsek_cdp/cdp/domdebugger/functions.py +155 -0
  67. parsek_cdp/cdp/domdebugger/types.py +57 -0
  68. parsek_cdp/cdp/domsnapshot/__init__.py +15 -0
  69. parsek_cdp/cdp/domsnapshot/events.py +13 -0
  70. parsek_cdp/cdp/domsnapshot/functions.py +111 -0
  71. parsek_cdp/cdp/domsnapshot/types.py +312 -0
  72. parsek_cdp/cdp/domstorage/__init__.py +15 -0
  73. parsek_cdp/cdp/domstorage/events.py +60 -0
  74. parsek_cdp/cdp/domstorage/functions.py +79 -0
  75. parsek_cdp/cdp/domstorage/types.py +30 -0
  76. parsek_cdp/cdp/emulation/__init__.py +15 -0
  77. parsek_cdp/cdp/emulation/events.py +17 -0
  78. parsek_cdp/cdp/emulation/functions.py +688 -0
  79. parsek_cdp/cdp/emulation/types.py +305 -0
  80. parsek_cdp/cdp/eventbreakpoints/__init__.py +15 -0
  81. parsek_cdp/cdp/eventbreakpoints/events.py +13 -0
  82. parsek_cdp/cdp/eventbreakpoints/functions.py +41 -0
  83. parsek_cdp/cdp/eventbreakpoints/types.py +10 -0
  84. parsek_cdp/cdp/extensions/__init__.py +15 -0
  85. parsek_cdp/cdp/extensions/events.py +13 -0
  86. parsek_cdp/cdp/extensions/functions.py +118 -0
  87. parsek_cdp/cdp/extensions/types.py +19 -0
  88. parsek_cdp/cdp/fedcm/__init__.py +15 -0
  89. parsek_cdp/cdp/fedcm/events.py +45 -0
  90. parsek_cdp/cdp/fedcm/functions.py +93 -0
  91. parsek_cdp/cdp/fedcm/types.py +72 -0
  92. parsek_cdp/cdp/fetch/__init__.py +15 -0
  93. parsek_cdp/cdp/fetch/events.py +82 -0
  94. parsek_cdp/cdp/fetch/functions.py +215 -0
  95. parsek_cdp/cdp/fetch/types.py +81 -0
  96. parsek_cdp/cdp/filesystem/__init__.py +15 -0
  97. parsek_cdp/cdp/filesystem/events.py +13 -0
  98. parsek_cdp/cdp/filesystem/functions.py +36 -0
  99. parsek_cdp/cdp/filesystem/types.py +54 -0
  100. parsek_cdp/cdp/headlessexperimental/__init__.py +15 -0
  101. parsek_cdp/cdp/headlessexperimental/events.py +13 -0
  102. parsek_cdp/cdp/headlessexperimental/functions.py +77 -0
  103. parsek_cdp/cdp/headlessexperimental/types.py +24 -0
  104. parsek_cdp/cdp/heapprofiler/__init__.py +15 -0
  105. parsek_cdp/cdp/heapprofiler/events.py +65 -0
  106. parsek_cdp/cdp/heapprofiler/functions.py +193 -0
  107. parsek_cdp/cdp/heapprofiler/types.py +57 -0
  108. parsek_cdp/cdp/indexeddb/__init__.py +15 -0
  109. parsek_cdp/cdp/indexeddb/events.py +13 -0
  110. parsek_cdp/cdp/indexeddb/functions.py +232 -0
  111. parsek_cdp/cdp/indexeddb/types.py +120 -0
  112. parsek_cdp/cdp/input/__init__.py +15 -0
  113. parsek_cdp/cdp/input/events.py +25 -0
  114. parsek_cdp/cdp/input/functions.py +361 -0
  115. parsek_cdp/cdp/input/types.py +87 -0
  116. parsek_cdp/cdp/inspector/__init__.py +15 -0
  117. parsek_cdp/cdp/inspector/events.py +41 -0
  118. parsek_cdp/cdp/inspector/functions.py +27 -0
  119. parsek_cdp/cdp/inspector/types.py +10 -0
  120. parsek_cdp/cdp/io/__init__.py +15 -0
  121. parsek_cdp/cdp/io/events.py +13 -0
  122. parsek_cdp/cdp/io/functions.py +77 -0
  123. parsek_cdp/cdp/io/types.py +13 -0
  124. parsek_cdp/cdp/layertree/__init__.py +15 -0
  125. parsek_cdp/cdp/layertree/events.py +36 -0
  126. parsek_cdp/cdp/layertree/functions.py +178 -0
  127. parsek_cdp/cdp/layertree/types.py +104 -0
  128. parsek_cdp/cdp/log/__init__.py +15 -0
  129. parsek_cdp/cdp/log/events.py +22 -0
  130. parsek_cdp/cdp/log/functions.py +54 -0
  131. parsek_cdp/cdp/log/types.py +57 -0
  132. parsek_cdp/cdp/media/__init__.py +15 -0
  133. parsek_cdp/cdp/media/events.py +87 -0
  134. parsek_cdp/cdp/media/functions.py +27 -0
  135. parsek_cdp/cdp/media/types.py +101 -0
  136. parsek_cdp/cdp/memory/__init__.py +15 -0
  137. parsek_cdp/cdp/memory/events.py +13 -0
  138. parsek_cdp/cdp/memory/functions.py +164 -0
  139. parsek_cdp/cdp/memory/types.py +71 -0
  140. parsek_cdp/cdp/mixins/__init__.py +21 -0
  141. parsek_cdp/cdp/mixins/datatype.py +123 -0
  142. parsek_cdp/cdp/mixins/event.py +78 -0
  143. parsek_cdp/cdp/mixins/namespace.py +31 -0
  144. parsek_cdp/cdp/network/__init__.py +15 -0
  145. parsek_cdp/cdp/network/events.py +726 -0
  146. parsek_cdp/cdp/network/functions.py +734 -0
  147. parsek_cdp/cdp/network/types.py +1247 -0
  148. parsek_cdp/cdp/overlay/__init__.py +15 -0
  149. parsek_cdp/cdp/overlay/events.py +54 -0
  150. parsek_cdp/cdp/overlay/functions.py +407 -0
  151. parsek_cdp/cdp/overlay/types.py +328 -0
  152. parsek_cdp/cdp/page/__init__.py +15 -0
  153. parsek_cdp/cdp/page/events.py +416 -0
  154. parsek_cdp/cdp/page/functions.py +1081 -0
  155. parsek_cdp/cdp/page/types.py +1088 -0
  156. parsek_cdp/cdp/performance/__init__.py +15 -0
  157. parsek_cdp/cdp/performance/events.py +24 -0
  158. parsek_cdp/cdp/performance/functions.py +63 -0
  159. parsek_cdp/cdp/performance/types.py +22 -0
  160. parsek_cdp/cdp/performancetimeline/__init__.py +15 -0
  161. parsek_cdp/cdp/performancetimeline/events.py +22 -0
  162. parsek_cdp/cdp/performancetimeline/functions.py +30 -0
  163. parsek_cdp/cdp/performancetimeline/types.py +85 -0
  164. parsek_cdp/cdp/preload/__init__.py +15 -0
  165. parsek_cdp/cdp/preload/events.py +116 -0
  166. parsek_cdp/cdp/preload/functions.py +25 -0
  167. parsek_cdp/cdp/preload/types.py +267 -0
  168. parsek_cdp/cdp/profiler/__init__.py +15 -0
  169. parsek_cdp/cdp/profiler/events.py +64 -0
  170. parsek_cdp/cdp/profiler/functions.py +134 -0
  171. parsek_cdp/cdp/profiler/types.py +105 -0
  172. parsek_cdp/cdp/pwa/__init__.py +15 -0
  173. parsek_cdp/cdp/pwa/events.py +13 -0
  174. parsek_cdp/cdp/pwa/functions.py +196 -0
  175. parsek_cdp/cdp/pwa/types.py +45 -0
  176. parsek_cdp/cdp/runtime/__init__.py +15 -0
  177. parsek_cdp/cdp/runtime/events.py +123 -0
  178. parsek_cdp/cdp/runtime/functions.py +552 -0
  179. parsek_cdp/cdp/runtime/types.py +319 -0
  180. parsek_cdp/cdp/schema/__init__.py +15 -0
  181. parsek_cdp/cdp/schema/events.py +13 -0
  182. parsek_cdp/cdp/schema/functions.py +32 -0
  183. parsek_cdp/cdp/schema/types.py +22 -0
  184. parsek_cdp/cdp/security/__init__.py +15 -0
  185. parsek_cdp/cdp/security/events.py +64 -0
  186. parsek_cdp/cdp/security/functions.py +66 -0
  187. parsek_cdp/cdp/security/types.py +168 -0
  188. parsek_cdp/cdp/serviceworker/__init__.py +15 -0
  189. parsek_cdp/cdp/serviceworker/events.py +43 -0
  190. parsek_cdp/cdp/serviceworker/functions.py +115 -0
  191. parsek_cdp/cdp/serviceworker/types.py +95 -0
  192. parsek_cdp/cdp/storage/__init__.py +15 -0
  193. parsek_cdp/cdp/storage/events.py +288 -0
  194. parsek_cdp/cdp/storage/functions.py +571 -0
  195. parsek_cdp/cdp/storage/types.py +656 -0
  196. parsek_cdp/cdp/systeminfo/__init__.py +15 -0
  197. parsek_cdp/cdp/systeminfo/events.py +13 -0
  198. parsek_cdp/cdp/systeminfo/functions.py +75 -0
  199. parsek_cdp/cdp/systeminfo/types.py +132 -0
  200. parsek_cdp/cdp/target/__init__.py +15 -0
  201. parsek_cdp/cdp/target/events.py +109 -0
  202. parsek_cdp/cdp/target/functions.py +424 -0
  203. parsek_cdp/cdp/target/types.py +83 -0
  204. parsek_cdp/cdp/tethering/__init__.py +15 -0
  205. parsek_cdp/cdp/tethering/events.py +22 -0
  206. parsek_cdp/cdp/tethering/functions.py +35 -0
  207. parsek_cdp/cdp/tethering/types.py +10 -0
  208. parsek_cdp/cdp/tracing/__init__.py +15 -0
  209. parsek_cdp/cdp/tracing/events.py +61 -0
  210. parsek_cdp/cdp/tracing/functions.py +119 -0
  211. parsek_cdp/cdp/tracing/types.py +81 -0
  212. parsek_cdp/cdp/webaudio/__init__.py +15 -0
  213. parsek_cdp/cdp/webaudio/events.py +184 -0
  214. parsek_cdp/cdp/webaudio/functions.py +51 -0
  215. parsek_cdp/cdp/webaudio/types.py +155 -0
  216. parsek_cdp/cdp/webauthn/__init__.py +15 -0
  217. parsek_cdp/cdp/webauthn/events.py +69 -0
  218. parsek_cdp/cdp/webauthn/functions.py +214 -0
  219. parsek_cdp/cdp/webauthn/types.py +96 -0
  220. parsek_cdp/core/__init__.py +18 -0
  221. parsek_cdp/core/browser.py +240 -0
  222. parsek_cdp/core/browser_context.py +58 -0
  223. parsek_cdp/core/element.py +405 -0
  224. parsek_cdp/core/feature.py +376 -0
  225. parsek_cdp/core/frame.py +351 -0
  226. parsek_cdp/core/pagable.py +175 -0
  227. parsek_cdp/core/page.py +163 -0
  228. parsek_cdp/core/target.py +490 -0
  229. parsek_cdp/features/__init__.py +14 -0
  230. parsek_cdp/features/request_listener/__init__.py +256 -0
  231. parsek_cdp/features/request_listener/events.py +48 -0
  232. parsek_cdp/features/request_listener/types.py +235 -0
  233. parsek_cdp/generate.py +642 -0
  234. parsek_cdp/parsek/__init__.py +18 -0
  235. parsek_cdp/parsek/events.py +38 -0
  236. parsek_cdp/parsek/types.py +36 -0
  237. parsek_cdp/py.typed +0 -0
  238. parsek_cdp-0.1.0.dist-info/METADATA +277 -0
  239. parsek_cdp-0.1.0.dist-info/RECORD +242 -0
  240. parsek_cdp-0.1.0.dist-info/WHEEL +5 -0
  241. parsek_cdp-0.1.0.dist-info/licenses/LICENSE +201 -0
  242. parsek_cdp-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,13 @@
1
+ """Events for the SystemInfo domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+
11
+ # This domain defines no events.
12
+
13
+ __all__ = []
@@ -0,0 +1,75 @@
1
+ """Commands for the SystemInfo domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import DataType, FieldMeta, encode
8
+
9
+ if TYPE_CHECKING:
10
+ from .types import (
11
+ GPUInfo,
12
+ ProcessInfo,
13
+ )
14
+
15
+ @dataclass
16
+ class GetInfoReturn(DataType):
17
+ """Return value of :meth:`SystemInfo.get_info`."""
18
+ gpu: GPUInfo
19
+ model_name: str
20
+ model_version: str
21
+ command_line: str
22
+ __FIELDS__: ClassVar[tuple] = (
23
+ FieldMeta('gpu', 'gpu', False, 'object', ref='SystemInfo.GPUInfo'),
24
+ FieldMeta('model_name', 'modelName', False, 'primitive'),
25
+ FieldMeta('model_version', 'modelVersion', False, 'primitive'),
26
+ FieldMeta('command_line', 'commandLine', False, 'primitive'),
27
+ )
28
+
29
+
30
+ @dataclass
31
+ class GetFeatureStateReturn(DataType):
32
+ """Return value of :meth:`SystemInfo.get_feature_state`."""
33
+ feature_enabled: bool
34
+ __FIELDS__: ClassVar[tuple] = (
35
+ FieldMeta('feature_enabled', 'featureEnabled', False, 'primitive'),
36
+ )
37
+
38
+
39
+ @dataclass
40
+ class GetProcessInfoReturn(DataType):
41
+ """Return value of :meth:`SystemInfo.get_process_info`."""
42
+ process_info: List[ProcessInfo]
43
+ __FIELDS__: ClassVar[tuple] = (
44
+ FieldMeta('process_info', 'processInfo', False, 'array', inner=FieldMeta('', '', False, 'object', ref='SystemInfo.ProcessInfo')),
45
+ )
46
+
47
+
48
+ class SystemInfo:
49
+ """Commands of the SystemInfo domain, bound to a target."""
50
+
51
+ def __init__(self, target: Any) -> None:
52
+ self._target = target
53
+
54
+
55
+ async def get_info(self) -> GetInfoReturn:
56
+ """Returns information about the system."""
57
+ _params: Dict[str, Any] = {}
58
+ _result = await self._target.send('SystemInfo.getInfo', _params)
59
+ return GetInfoReturn.from_json(_result)
60
+
61
+ async def get_feature_state(self, *, feature_state: str) -> GetFeatureStateReturn:
62
+ """
63
+ Returns information about the feature state.
64
+ :param feature_state:
65
+ """
66
+ _params: Dict[str, Any] = {}
67
+ _params['featureState'] = encode(FieldMeta('', '', False, 'primitive'), feature_state)
68
+ _result = await self._target.send('SystemInfo.getFeatureState', _params)
69
+ return GetFeatureStateReturn.from_json(_result)
70
+
71
+ async def get_process_info(self) -> GetProcessInfoReturn:
72
+ """Returns information about all running processes."""
73
+ _params: Dict[str, Any] = {}
74
+ _result = await self._target.send('SystemInfo.getProcessInfo', _params)
75
+ return GetProcessInfoReturn.from_json(_result)
@@ -0,0 +1,132 @@
1
+ """Custom types and enums for the SystemInfo domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from enum import Enum
6
+ from typing import Any, ClassVar, Dict, List, Literal, Optional
7
+
8
+ from ..mixins.datatype import DataType, FieldMeta, register
9
+
10
+
11
+ @register("SystemInfo.GPUDevice")
12
+ @dataclass
13
+ class GPUDevice(DataType):
14
+ """Describes a single graphics processor (GPU)."""
15
+ vendor_id: float
16
+ device_id: float
17
+ vendor_string: str
18
+ device_string: str
19
+ driver_vendor: str
20
+ driver_version: str
21
+ sub_sys_id: Optional[float] = None
22
+ revision: Optional[float] = None
23
+ __FIELDS__: ClassVar[tuple] = (
24
+ FieldMeta('vendor_id', 'vendorId', False, 'primitive'),
25
+ FieldMeta('device_id', 'deviceId', False, 'primitive'),
26
+ FieldMeta('vendor_string', 'vendorString', False, 'primitive'),
27
+ FieldMeta('device_string', 'deviceString', False, 'primitive'),
28
+ FieldMeta('driver_vendor', 'driverVendor', False, 'primitive'),
29
+ FieldMeta('driver_version', 'driverVersion', False, 'primitive'),
30
+ FieldMeta('sub_sys_id', 'subSysId', True, 'primitive'),
31
+ FieldMeta('revision', 'revision', True, 'primitive'),
32
+ )
33
+
34
+
35
+ @register("SystemInfo.Size")
36
+ @dataclass
37
+ class Size(DataType):
38
+ """Describes the width and height dimensions of an entity."""
39
+ width: int
40
+ height: int
41
+ __FIELDS__: ClassVar[tuple] = (
42
+ FieldMeta('width', 'width', False, 'primitive'),
43
+ FieldMeta('height', 'height', False, 'primitive'),
44
+ )
45
+
46
+
47
+ @register("SystemInfo.VideoDecodeAcceleratorCapability")
48
+ @dataclass
49
+ class VideoDecodeAcceleratorCapability(DataType):
50
+ """
51
+ Describes a supported video decoding profile with its associated minimum and
52
+ maximum resolutions.
53
+ """
54
+ profile: str
55
+ max_resolution: Size
56
+ min_resolution: Size
57
+ __FIELDS__: ClassVar[tuple] = (
58
+ FieldMeta('profile', 'profile', False, 'primitive'),
59
+ FieldMeta('max_resolution', 'maxResolution', False, 'object', ref='SystemInfo.Size'),
60
+ FieldMeta('min_resolution', 'minResolution', False, 'object', ref='SystemInfo.Size'),
61
+ )
62
+
63
+
64
+ @register("SystemInfo.VideoEncodeAcceleratorCapability")
65
+ @dataclass
66
+ class VideoEncodeAcceleratorCapability(DataType):
67
+ """
68
+ Describes a supported video encoding profile with its associated maximum
69
+ resolution and maximum framerate.
70
+ """
71
+ profile: str
72
+ max_resolution: Size
73
+ max_framerate_numerator: int
74
+ max_framerate_denominator: int
75
+ __FIELDS__: ClassVar[tuple] = (
76
+ FieldMeta('profile', 'profile', False, 'primitive'),
77
+ FieldMeta('max_resolution', 'maxResolution', False, 'object', ref='SystemInfo.Size'),
78
+ FieldMeta('max_framerate_numerator', 'maxFramerateNumerator', False, 'primitive'),
79
+ FieldMeta('max_framerate_denominator', 'maxFramerateDenominator', False, 'primitive'),
80
+ )
81
+
82
+
83
+ @register("SystemInfo.SubsamplingFormat")
84
+ class SubsamplingFormat(str, Enum):
85
+ """YUV subsampling type of the pixels of a given image."""
86
+ YUV420 = 'yuv420'
87
+ YUV422 = 'yuv422'
88
+ YUV444 = 'yuv444'
89
+
90
+
91
+ @register("SystemInfo.ImageType")
92
+ class ImageType(str, Enum):
93
+ """Image format of a given image."""
94
+ JPEG = 'jpeg'
95
+ WEBP = 'webp'
96
+ UNKNOWN = 'unknown'
97
+
98
+
99
+ @register("SystemInfo.GPUInfo")
100
+ @dataclass
101
+ class GPUInfo(DataType):
102
+ """Provides information about the GPU(s) on the system."""
103
+ devices: List[GPUDevice]
104
+ driver_bug_workarounds: List[str]
105
+ video_decoding: List[VideoDecodeAcceleratorCapability]
106
+ video_encoding: List[VideoEncodeAcceleratorCapability]
107
+ aux_attributes: Optional[Dict[str, Any]] = None
108
+ feature_status: Optional[Dict[str, Any]] = None
109
+ __FIELDS__: ClassVar[tuple] = (
110
+ FieldMeta('devices', 'devices', False, 'array', inner=FieldMeta('', '', False, 'object', ref='SystemInfo.GPUDevice')),
111
+ FieldMeta('driver_bug_workarounds', 'driverBugWorkarounds', False, 'array', inner=FieldMeta('', '', False, 'primitive')),
112
+ FieldMeta('video_decoding', 'videoDecoding', False, 'array', inner=FieldMeta('', '', False, 'object', ref='SystemInfo.VideoDecodeAcceleratorCapability')),
113
+ FieldMeta('video_encoding', 'videoEncoding', False, 'array', inner=FieldMeta('', '', False, 'object', ref='SystemInfo.VideoEncodeAcceleratorCapability')),
114
+ FieldMeta('aux_attributes', 'auxAttributes', True, 'primitive'),
115
+ FieldMeta('feature_status', 'featureStatus', True, 'primitive'),
116
+ )
117
+
118
+
119
+ @register("SystemInfo.ProcessInfo")
120
+ @dataclass
121
+ class ProcessInfo(DataType):
122
+ """Represents process info."""
123
+ type_: str
124
+ id: int
125
+ cpu_time: float
126
+ __FIELDS__: ClassVar[tuple] = (
127
+ FieldMeta('type_', 'type', False, 'primitive'),
128
+ FieldMeta('id', 'id', False, 'primitive'),
129
+ FieldMeta('cpu_time', 'cpuTime', False, 'primitive'),
130
+ )
131
+
132
+ __all__ = ["GPUDevice", "GPUInfo", "ImageType", "ProcessInfo", "Size", "SubsamplingFormat", "VideoDecodeAcceleratorCapability", "VideoEncodeAcceleratorCapability"]
@@ -0,0 +1,15 @@
1
+ """The Target CDP domain (generated).
2
+
3
+ Importing ``Target`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``Target.SomeEvent`` /
5
+ ``Target.SomeType``); commands run on a target via ``page.cdp.Target``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import Target
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(Target,)``).
13
+ DOMAIN = "Target"
14
+
15
+ __all__ = ["events", "functions", "types", "Target", "DOMAIN"]
@@ -0,0 +1,109 @@
1
+ """Events for the Target domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+ if TYPE_CHECKING:
11
+ from .types import (
12
+ SessionID,
13
+ TargetID,
14
+ TargetInfo,
15
+ )
16
+
17
+ @register_event("Target.attachedToTarget")
18
+ @dataclass
19
+ class AttachedToTarget(Event):
20
+ """Issued when attached to target because of auto-attach or `attachToTarget` command."""
21
+ session_id: SessionID
22
+ target_info: TargetInfo
23
+ waiting_for_debugger: bool
24
+ __FIELDS__: ClassVar[tuple] = (
25
+ FieldMeta('session_id', 'sessionId', False, 'primitive'),
26
+ FieldMeta('target_info', 'targetInfo', False, 'object', ref='Target.TargetInfo'),
27
+ FieldMeta('waiting_for_debugger', 'waitingForDebugger', False, 'primitive'),
28
+ )
29
+
30
+
31
+ @register_event("Target.detachedFromTarget")
32
+ @dataclass
33
+ class DetachedFromTarget(Event):
34
+ """
35
+ Issued when detached from target for any reason (including `detachFromTarget` command). Can be
36
+ issued multiple times per target if multiple sessions have been attached to it.
37
+ """
38
+ session_id: SessionID
39
+ target_id: Optional[TargetID] = None
40
+ __FIELDS__: ClassVar[tuple] = (
41
+ FieldMeta('session_id', 'sessionId', False, 'primitive'),
42
+ FieldMeta('target_id', 'targetId', True, 'primitive'),
43
+ )
44
+
45
+
46
+ @register_event("Target.receivedMessageFromTarget")
47
+ @dataclass
48
+ class ReceivedMessageFromTarget(Event):
49
+ """
50
+ Notifies about a new protocol message received from the session (as reported in
51
+ `attachedToTarget` event).
52
+ """
53
+ session_id: SessionID
54
+ message: str
55
+ target_id: Optional[TargetID] = None
56
+ __FIELDS__: ClassVar[tuple] = (
57
+ FieldMeta('session_id', 'sessionId', False, 'primitive'),
58
+ FieldMeta('message', 'message', False, 'primitive'),
59
+ FieldMeta('target_id', 'targetId', True, 'primitive'),
60
+ )
61
+
62
+
63
+ @register_event("Target.targetCreated")
64
+ @dataclass
65
+ class TargetCreated(Event):
66
+ """Issued when a possible inspection target is created."""
67
+ target_info: TargetInfo
68
+ __FIELDS__: ClassVar[tuple] = (
69
+ FieldMeta('target_info', 'targetInfo', False, 'object', ref='Target.TargetInfo'),
70
+ )
71
+
72
+
73
+ @register_event("Target.targetDestroyed")
74
+ @dataclass
75
+ class TargetDestroyed(Event):
76
+ """Issued when a target is destroyed."""
77
+ target_id: TargetID
78
+ __FIELDS__: ClassVar[tuple] = (
79
+ FieldMeta('target_id', 'targetId', False, 'primitive'),
80
+ )
81
+
82
+
83
+ @register_event("Target.targetCrashed")
84
+ @dataclass
85
+ class TargetCrashed(Event):
86
+ """Issued when a target has crashed."""
87
+ target_id: TargetID
88
+ status: str
89
+ error_code: int
90
+ __FIELDS__: ClassVar[tuple] = (
91
+ FieldMeta('target_id', 'targetId', False, 'primitive'),
92
+ FieldMeta('status', 'status', False, 'primitive'),
93
+ FieldMeta('error_code', 'errorCode', False, 'primitive'),
94
+ )
95
+
96
+
97
+ @register_event("Target.targetInfoChanged")
98
+ @dataclass
99
+ class TargetInfoChanged(Event):
100
+ """
101
+ Issued when some information about a target has changed. This only happens between
102
+ `targetCreated` and `targetDestroyed`.
103
+ """
104
+ target_info: TargetInfo
105
+ __FIELDS__: ClassVar[tuple] = (
106
+ FieldMeta('target_info', 'targetInfo', False, 'object', ref='Target.TargetInfo'),
107
+ )
108
+
109
+ __all__ = ["AttachedToTarget", "DetachedFromTarget", "ReceivedMessageFromTarget", "TargetCrashed", "TargetCreated", "TargetDestroyed", "TargetInfoChanged"]