cdpify 0.2.11__tar.gz → 0.3.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 (443) hide show
  1. cdpify-0.3.0/PKG-INFO +304 -0
  2. cdpify-0.3.0/README.md +287 -0
  3. cdpify-0.3.0/cdpify/__init__.py +27 -0
  4. cdpify-0.3.0/cdpify/client.py +160 -0
  5. cdpify-0.3.0/cdpify/codec.py +183 -0
  6. cdpify-0.3.0/cdpify/domains/__init__.py +125 -0
  7. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/accessibility/__init__.py +14 -17
  8. cdpify-0.3.0/cdpify/domains/accessibility/commands.py +151 -0
  9. cdpify-0.2.11/cdpify/domains/accessibility/client.py → cdpify-0.3.0/cdpify/domains/accessibility/domain.py +28 -47
  10. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/accessibility/events.py +9 -8
  11. cdpify-0.3.0/cdpify/domains/accessibility/types.py +223 -0
  12. cdpify-0.3.0/cdpify/domains/accessors.py +304 -0
  13. cdpify-0.3.0/cdpify/domains/ads/__init__.py +19 -0
  14. cdpify-0.3.0/cdpify/domains/ads/commands.py +28 -0
  15. cdpify-0.3.0/cdpify/domains/ads/domain.py +45 -0
  16. cdpify-0.3.0/cdpify/domains/ads/types.py +60 -0
  17. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/animation/__init__.py +11 -12
  18. cdpify-0.3.0/cdpify/domains/animation/commands.py +105 -0
  19. cdpify-0.2.11/cdpify/domains/animation/client.py → cdpify-0.3.0/cdpify/domains/animation/domain.py +32 -61
  20. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/animation/events.py +15 -14
  21. cdpify-0.3.0/cdpify/domains/animation/types.py +96 -0
  22. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/audits/__init__.py +65 -66
  23. cdpify-0.3.0/cdpify/domains/audits/commands.py +47 -0
  24. cdpify-0.2.11/cdpify/domains/audits/client.py → cdpify-0.3.0/cdpify/domains/audits/domain.py +15 -25
  25. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/audits/events.py +6 -5
  26. cdpify-0.3.0/cdpify/domains/audits/types.py +1092 -0
  27. cdpify-0.3.0/cdpify/domains/autofill/__init__.py +34 -0
  28. cdpify-0.3.0/cdpify/domains/autofill/commands.py +46 -0
  29. cdpify-0.3.0/cdpify/domains/autofill/domain.py +86 -0
  30. cdpify-0.3.0/cdpify/domains/autofill/events.py +27 -0
  31. cdpify-0.3.0/cdpify/domains/autofill/types.py +72 -0
  32. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/backgroundservice/__init__.py +7 -8
  33. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/backgroundservice/commands.py +16 -15
  34. cdpify-0.2.11/cdpify/domains/backgroundservice/client.py → cdpify-0.3.0/cdpify/domains/backgroundservice/domain.py +17 -32
  35. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/backgroundservice/events.py +15 -10
  36. cdpify-0.3.0/cdpify/domains/backgroundservice/types.py +47 -0
  37. cdpify-0.3.0/cdpify/domains/bluetoothemulation/__init__.py +79 -0
  38. cdpify-0.3.0/cdpify/domains/bluetoothemulation/commands.py +216 -0
  39. cdpify-0.3.0/cdpify/domains/bluetoothemulation/domain.py +314 -0
  40. cdpify-0.3.0/cdpify/domains/bluetoothemulation/events.py +62 -0
  41. cdpify-0.3.0/cdpify/domains/bluetoothemulation/types.py +96 -0
  42. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/browser/__init__.py +20 -21
  43. cdpify-0.3.0/cdpify/domains/browser/commands.py +267 -0
  44. cdpify-0.2.11/cdpify/domains/browser/client.py → cdpify-0.3.0/cdpify/domains/browser/domain.py +87 -138
  45. cdpify-0.3.0/cdpify/domains/browser/events.py +43 -0
  46. cdpify-0.3.0/cdpify/domains/browser/types.py +129 -0
  47. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/cachestorage/__init__.py +12 -14
  48. cdpify-0.3.0/cdpify/domains/cachestorage/commands.py +101 -0
  49. cdpify-0.2.11/cdpify/domains/cachestorage/client.py → cdpify-0.3.0/cdpify/domains/cachestorage/domain.py +23 -36
  50. cdpify-0.3.0/cdpify/domains/cachestorage/types.py +68 -0
  51. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/cast/__init__.py +3 -6
  52. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/cast/commands.py +20 -17
  53. cdpify-0.2.11/cdpify/domains/cast/client.py → cdpify-0.3.0/cdpify/domains/cast/domain.py +22 -42
  54. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/cast/events.py +9 -8
  55. cdpify-0.3.0/cdpify/domains/cast/types.py +14 -0
  56. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/console/__init__.py +3 -6
  57. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/console/commands.py +2 -2
  58. cdpify-0.2.11/cdpify/domains/console/client.py → cdpify-0.3.0/cdpify/domains/console/domain.py +10 -22
  59. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/console/events.py +6 -5
  60. cdpify-0.3.0/cdpify/domains/console/types.py +38 -0
  61. cdpify-0.3.0/cdpify/domains/crashreportcontext/__init__.py +16 -0
  62. cdpify-0.3.0/cdpify/domains/crashreportcontext/commands.py +21 -0
  63. cdpify-0.3.0/cdpify/domains/crashreportcontext/domain.py +30 -0
  64. cdpify-0.3.0/cdpify/domains/crashreportcontext/types.py +20 -0
  65. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/css/__init__.py +57 -54
  66. cdpify-0.3.0/cdpify/domains/css/commands.py +651 -0
  67. cdpify-0.2.11/cdpify/domains/css/client.py → cdpify-0.3.0/cdpify/domains/css/domain.py +136 -200
  68. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/css/events.py +20 -23
  69. cdpify-0.3.0/cdpify/domains/css/types.py +689 -0
  70. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/debugger/__init__.py +18 -21
  71. cdpify-0.3.0/cdpify/domains/debugger/commands.py +541 -0
  72. cdpify-0.2.11/cdpify/domains/debugger/client.py → cdpify-0.3.0/cdpify/domains/debugger/domain.py +109 -195
  73. cdpify-0.3.0/cdpify/domains/debugger/events.py +174 -0
  74. cdpify-0.3.0/cdpify/domains/debugger/types.py +159 -0
  75. cdpify-0.3.0/cdpify/domains/deviceaccess/__init__.py +22 -0
  76. cdpify-0.3.0/cdpify/domains/deviceaccess/commands.py +39 -0
  77. cdpify-0.3.0/cdpify/domains/deviceaccess/domain.py +76 -0
  78. cdpify-0.3.0/cdpify/domains/deviceaccess/events.py +28 -0
  79. cdpify-0.3.0/cdpify/domains/deviceaccess/types.py +27 -0
  80. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/deviceorientation/__init__.py +2 -3
  81. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/deviceorientation/commands.py +8 -7
  82. cdpify-0.2.11/cdpify/domains/deviceorientation/client.py → cdpify-0.3.0/cdpify/domains/deviceorientation/domain.py +10 -18
  83. cdpify-0.3.0/cdpify/domains/digitalcredentials/__init__.py +16 -0
  84. cdpify-0.3.0/cdpify/domains/digitalcredentials/commands.py +36 -0
  85. cdpify-0.3.0/cdpify/domains/digitalcredentials/domain.py +47 -0
  86. {cdpify-0.2.11/cdpify/domains/deviceorientation → cdpify-0.3.0/cdpify/domains/digitalcredentials}/types.py +5 -3
  87. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/dom/__init__.py +30 -31
  88. cdpify-0.3.0/cdpify/domains/dom/commands.py +806 -0
  89. cdpify-0.2.11/cdpify/domains/dom/client.py → cdpify-0.3.0/cdpify/domains/dom/domain.py +182 -290
  90. cdpify-0.3.0/cdpify/domains/dom/events.py +237 -0
  91. cdpify-0.3.0/cdpify/domains/dom/types.py +271 -0
  92. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/domdebugger/__init__.py +3 -5
  93. cdpify-0.3.0/cdpify/domains/domdebugger/commands.py +132 -0
  94. cdpify-0.2.11/cdpify/domains/domdebugger/client.py → cdpify-0.3.0/cdpify/domains/domdebugger/domain.py +36 -67
  95. cdpify-0.3.0/cdpify/domains/domdebugger/types.py +48 -0
  96. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/domsnapshot/__init__.py +16 -18
  97. cdpify-0.3.0/cdpify/domains/domsnapshot/commands.py +86 -0
  98. cdpify-0.2.11/cdpify/domains/domsnapshot/client.py → cdpify-0.3.0/cdpify/domains/domsnapshot/domain.py +16 -29
  99. cdpify-0.3.0/cdpify/domains/domsnapshot/types.py +301 -0
  100. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/domstorage/__init__.py +4 -7
  101. cdpify-0.3.0/cdpify/domains/domstorage/commands.py +50 -0
  102. cdpify-0.2.11/cdpify/domains/domstorage/client.py → cdpify-0.3.0/cdpify/domains/domstorage/domain.py +22 -42
  103. cdpify-0.3.0/cdpify/domains/domstorage/events.py +45 -0
  104. cdpify-0.3.0/cdpify/domains/domstorage/types.py +31 -0
  105. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/emulation/__init__.py +29 -30
  106. cdpify-0.3.0/cdpify/domains/emulation/commands.py +617 -0
  107. cdpify-0.2.11/cdpify/domains/emulation/client.py → cdpify-0.3.0/cdpify/domains/emulation/domain.py +181 -308
  108. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/emulation/events.py +11 -8
  109. cdpify-0.3.0/cdpify/domains/emulation/types.py +211 -0
  110. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/eventbreakpoints/__init__.py +2 -3
  111. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/eventbreakpoints/commands.py +9 -8
  112. cdpify-0.2.11/cdpify/domains/eventbreakpoints/client.py → cdpify-0.3.0/cdpify/domains/eventbreakpoints/domain.py +13 -24
  113. cdpify-0.3.0/cdpify/domains/extensions/__init__.py +38 -0
  114. cdpify-0.3.0/cdpify/domains/extensions/commands.py +117 -0
  115. cdpify-0.3.0/cdpify/domains/extensions/domain.py +163 -0
  116. cdpify-0.3.0/cdpify/domains/extensions/types.py +26 -0
  117. cdpify-0.3.0/cdpify/domains/fedcm/__init__.py +41 -0
  118. cdpify-0.3.0/cdpify/domains/fedcm/commands.py +57 -0
  119. cdpify-0.3.0/cdpify/domains/fedcm/domain.py +119 -0
  120. cdpify-0.3.0/cdpify/domains/fedcm/events.py +37 -0
  121. cdpify-0.3.0/cdpify/domains/fedcm/types.py +51 -0
  122. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/fetch/__init__.py +10 -13
  123. cdpify-0.3.0/cdpify/domains/fetch/commands.py +169 -0
  124. cdpify-0.2.11/cdpify/domains/fetch/client.py → cdpify-0.3.0/cdpify/domains/fetch/domain.py +33 -59
  125. cdpify-0.3.0/cdpify/domains/fetch/events.py +74 -0
  126. cdpify-0.3.0/cdpify/domains/fetch/types.py +71 -0
  127. cdpify-0.3.0/cdpify/domains/filesystem/__init__.py +19 -0
  128. cdpify-0.3.0/cdpify/domains/filesystem/commands.py +29 -0
  129. cdpify-0.3.0/cdpify/domains/filesystem/domain.py +37 -0
  130. cdpify-0.3.0/cdpify/domains/filesystem/types.py +33 -0
  131. cdpify-0.3.0/cdpify/domains/headlessexperimental/__init__.py +17 -0
  132. cdpify-0.3.0/cdpify/domains/headlessexperimental/commands.py +48 -0
  133. cdpify-0.3.0/cdpify/domains/headlessexperimental/domain.py +75 -0
  134. cdpify-0.3.0/cdpify/domains/headlessexperimental/types.py +23 -0
  135. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/heapprofiler/__init__.py +8 -11
  136. cdpify-0.3.0/cdpify/domains/heapprofiler/commands.py +126 -0
  137. cdpify-0.2.11/cdpify/domains/heapprofiler/client.py → cdpify-0.3.0/cdpify/domains/heapprofiler/domain.py +38 -71
  138. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/heapprofiler/events.py +20 -19
  139. cdpify-0.3.0/cdpify/domains/heapprofiler/types.py +48 -0
  140. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/indexeddb/__init__.py +13 -15
  141. cdpify-0.3.0/cdpify/domains/indexeddb/commands.py +174 -0
  142. cdpify-0.2.11/cdpify/domains/indexeddb/client.py → cdpify-0.3.0/cdpify/domains/indexeddb/domain.py +34 -58
  143. cdpify-0.3.0/cdpify/domains/indexeddb/types.py +94 -0
  144. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/input/__init__.py +10 -13
  145. cdpify-0.3.0/cdpify/domains/input/commands.py +268 -0
  146. cdpify-0.2.11/cdpify/domains/input/client.py → cdpify-0.3.0/cdpify/domains/input/domain.py +45 -85
  147. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/input/events.py +6 -5
  148. cdpify-0.3.0/cdpify/domains/input/types.py +52 -0
  149. cdpify-0.3.0/cdpify/domains/inspector/__init__.py +25 -0
  150. cdpify-0.2.11/cdpify/domains/tethering/types.py → cdpify-0.3.0/cdpify/domains/inspector/commands.py +8 -3
  151. cdpify-0.3.0/cdpify/domains/inspector/domain.py +38 -0
  152. cdpify-0.3.0/cdpify/domains/inspector/events.py +53 -0
  153. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/io/__init__.py +3 -5
  154. cdpify-0.3.0/cdpify/domains/io/commands.py +63 -0
  155. cdpify-0.2.11/cdpify/domains/io/client.py → cdpify-0.3.0/cdpify/domains/io/domain.py +16 -24
  156. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/io/types.py +0 -3
  157. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/layertree/__init__.py +11 -14
  158. cdpify-0.3.0/cdpify/domains/layertree/commands.py +132 -0
  159. cdpify-0.2.11/cdpify/domains/layertree/client.py → cdpify-0.3.0/cdpify/domains/layertree/domain.py +32 -54
  160. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/layertree/events.py +10 -13
  161. cdpify-0.3.0/cdpify/domains/layertree/types.py +101 -0
  162. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/log/__init__.py +3 -6
  163. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/log/commands.py +6 -5
  164. cdpify-0.2.11/cdpify/domains/log/client.py → cdpify-0.3.0/cdpify/domains/log/domain.py +16 -34
  165. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/log/events.py +6 -5
  166. cdpify-0.3.0/cdpify/domains/log/types.py +75 -0
  167. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/media/__init__.py +12 -15
  168. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/media/commands.py +2 -2
  169. cdpify-0.2.11/cdpify/domains/media/client.py → cdpify-0.3.0/cdpify/domains/media/domain.py +8 -17
  170. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/media/events.py +22 -21
  171. cdpify-0.3.0/cdpify/domains/media/types.py +81 -0
  172. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/memory/__init__.py +9 -11
  173. cdpify-0.3.0/cdpify/domains/memory/commands.py +87 -0
  174. cdpify-0.2.11/cdpify/domains/memory/client.py → cdpify-0.3.0/cdpify/domains/memory/domain.py +31 -62
  175. cdpify-0.3.0/cdpify/domains/memory/types.py +56 -0
  176. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/network/__init__.py +93 -120
  177. cdpify-0.3.0/cdpify/domains/network/commands.py +509 -0
  178. cdpify-0.2.11/cdpify/domains/network/client.py → cdpify-0.3.0/cdpify/domains/network/domain.py +105 -343
  179. cdpify-0.3.0/cdpify/domains/network/events.py +678 -0
  180. cdpify-0.3.0/cdpify/domains/network/types.py +1399 -0
  181. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/overlay/__init__.py +33 -30
  182. cdpify-0.3.0/cdpify/domains/overlay/commands.py +387 -0
  183. cdpify-0.2.11/cdpify/domains/overlay/client.py → cdpify-0.3.0/cdpify/domains/overlay/domain.py +113 -185
  184. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/overlay/events.py +19 -22
  185. cdpify-0.3.0/cdpify/domains/overlay/types.py +380 -0
  186. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/page/__init__.py +68 -65
  187. cdpify-0.3.0/cdpify/domains/page/commands.py +813 -0
  188. cdpify-0.2.11/cdpify/domains/page/client.py → cdpify-0.3.0/cdpify/domains/page/domain.py +218 -337
  189. cdpify-0.3.0/cdpify/domains/page/events.py +386 -0
  190. cdpify-0.3.0/cdpify/domains/page/types.py +883 -0
  191. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/performance/__init__.py +3 -6
  192. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/performance/commands.py +17 -12
  193. cdpify-0.2.11/cdpify/domains/performance/client.py → cdpify-0.3.0/cdpify/domains/performance/domain.py +17 -29
  194. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/performance/events.py +7 -6
  195. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/performance/types.py +5 -6
  196. cdpify-0.3.0/cdpify/domains/performancetimeline/__init__.py +27 -0
  197. cdpify-0.3.0/cdpify/domains/performancetimeline/commands.py +22 -0
  198. cdpify-0.3.0/cdpify/domains/performancetimeline/domain.py +34 -0
  199. cdpify-0.3.0/cdpify/domains/performancetimeline/events.py +26 -0
  200. cdpify-0.3.0/cdpify/domains/performancetimeline/types.py +64 -0
  201. cdpify-0.3.0/cdpify/domains/preload/__init__.py +55 -0
  202. cdpify-0.2.11/cdpify/domains/eventbreakpoints/types.py → cdpify-0.3.0/cdpify/domains/preload/commands.py +8 -3
  203. cdpify-0.3.0/cdpify/domains/preload/domain.py +32 -0
  204. cdpify-0.3.0/cdpify/domains/preload/events.py +113 -0
  205. cdpify-0.3.0/cdpify/domains/preload/types.py +250 -0
  206. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/profiler/__init__.py +10 -13
  207. cdpify-0.3.0/cdpify/domains/profiler/commands.py +71 -0
  208. cdpify-0.2.11/cdpify/domains/profiler/client.py → cdpify-0.3.0/cdpify/domains/profiler/domain.py +26 -51
  209. cdpify-0.3.0/cdpify/domains/profiler/events.py +54 -0
  210. cdpify-0.3.0/cdpify/domains/profiler/types.py +83 -0
  211. cdpify-0.3.0/cdpify/domains/pwa/__init__.py +39 -0
  212. cdpify-0.3.0/cdpify/domains/pwa/commands.py +145 -0
  213. cdpify-0.3.0/cdpify/domains/pwa/domain.py +180 -0
  214. cdpify-0.3.0/cdpify/domains/pwa/types.py +32 -0
  215. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/runtime/__init__.py +27 -30
  216. cdpify-0.3.0/cdpify/domains/runtime/commands.py +396 -0
  217. cdpify-0.2.11/cdpify/domains/runtime/client.py → cdpify-0.3.0/cdpify/domains/runtime/domain.py +68 -129
  218. cdpify-0.3.0/cdpify/domains/runtime/events.py +149 -0
  219. cdpify-0.3.0/cdpify/domains/runtime/types.py +430 -0
  220. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/schema/__init__.py +3 -5
  221. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/schema/commands.py +6 -5
  222. cdpify-0.2.11/cdpify/domains/schema/client.py → cdpify-0.3.0/cdpify/domains/schema/domain.py +8 -12
  223. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/schema/types.py +5 -6
  224. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/security/__init__.py +14 -17
  225. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/security/commands.py +13 -12
  226. cdpify-0.2.11/cdpify/domains/security/client.py → cdpify-0.3.0/cdpify/domains/security/domain.py +19 -38
  227. cdpify-0.3.0/cdpify/domains/security/events.py +65 -0
  228. cdpify-0.3.0/cdpify/domains/security/types.py +142 -0
  229. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/serviceworker/__init__.py +20 -13
  230. cdpify-0.3.0/cdpify/domains/serviceworker/commands.py +81 -0
  231. cdpify-0.2.11/cdpify/domains/serviceworker/client.py → cdpify-0.3.0/cdpify/domains/serviceworker/domain.py +39 -78
  232. cdpify-0.3.0/cdpify/domains/serviceworker/events.py +39 -0
  233. cdpify-0.3.0/cdpify/domains/serviceworker/types.py +140 -0
  234. cdpify-0.3.0/cdpify/domains/smartcardemulation/__init__.py +87 -0
  235. cdpify-0.3.0/cdpify/domains/smartcardemulation/commands.py +190 -0
  236. cdpify-0.3.0/cdpify/domains/smartcardemulation/domain.py +289 -0
  237. cdpify-0.3.0/cdpify/domains/smartcardemulation/events.py +231 -0
  238. cdpify-0.3.0/cdpify/domains/smartcardemulation/types.py +116 -0
  239. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/storage/__init__.py +12 -77
  240. cdpify-0.3.0/cdpify/domains/storage/commands.py +284 -0
  241. cdpify-0.3.0/cdpify/domains/storage/domain.py +413 -0
  242. cdpify-0.3.0/cdpify/domains/storage/events.py +78 -0
  243. cdpify-0.3.0/cdpify/domains/storage/types.py +80 -0
  244. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/systeminfo/__init__.py +12 -14
  245. cdpify-0.3.0/cdpify/domains/systeminfo/commands.py +46 -0
  246. cdpify-0.2.11/cdpify/domains/systeminfo/client.py → cdpify-0.3.0/cdpify/domains/systeminfo/domain.py +13 -21
  247. cdpify-0.3.0/cdpify/domains/systeminfo/types.py +107 -0
  248. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/target/__init__.py +11 -14
  249. cdpify-0.3.0/cdpify/domains/target/commands.py +323 -0
  250. cdpify-0.2.11/cdpify/domains/target/client.py → cdpify-0.3.0/cdpify/domains/target/domain.py +66 -119
  251. cdpify-0.3.0/cdpify/domains/target/events.py +98 -0
  252. cdpify-0.3.0/cdpify/domains/target/types.py +74 -0
  253. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/tethering/__init__.py +2 -4
  254. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/tethering/commands.py +9 -8
  255. cdpify-0.2.11/cdpify/domains/tethering/client.py → cdpify-0.3.0/cdpify/domains/tethering/domain.py +12 -20
  256. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/tethering/events.py +7 -6
  257. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/tracing/__init__.py +10 -13
  258. cdpify-0.3.0/cdpify/domains/tracing/commands.py +102 -0
  259. cdpify-0.2.11/cdpify/domains/tracing/client.py → cdpify-0.3.0/cdpify/domains/tracing/domain.py +26 -38
  260. cdpify-0.3.0/cdpify/domains/tracing/events.py +61 -0
  261. cdpify-0.3.0/cdpify/domains/tracing/types.py +80 -0
  262. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/webaudio/__init__.py +17 -20
  263. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/webaudio/commands.py +9 -8
  264. cdpify-0.2.11/cdpify/domains/webaudio/client.py → cdpify-0.3.0/cdpify/domains/webaudio/domain.py +13 -24
  265. cdpify-0.3.0/cdpify/domains/webaudio/events.py +181 -0
  266. cdpify-0.3.0/cdpify/domains/webaudio/types.py +128 -0
  267. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/domains/webauthn/__init__.py +10 -13
  268. cdpify-0.3.0/cdpify/domains/webauthn/commands.py +183 -0
  269. cdpify-0.2.11/cdpify/domains/webauthn/client.py → cdpify-0.3.0/cdpify/domains/webauthn/domain.py +50 -83
  270. cdpify-0.3.0/cdpify/domains/webauthn/events.py +62 -0
  271. cdpify-0.3.0/cdpify/domains/webauthn/types.py +93 -0
  272. cdpify-0.3.0/cdpify/domains/webmcp/__init__.py +43 -0
  273. cdpify-0.3.0/cdpify/domains/webmcp/commands.py +43 -0
  274. cdpify-0.3.0/cdpify/domains/webmcp/domain.py +81 -0
  275. cdpify-0.3.0/cdpify/domains/webmcp/events.py +69 -0
  276. cdpify-0.3.0/cdpify/domains/webmcp/types.py +65 -0
  277. cdpify-0.3.0/cdpify/events/__init__.py +9 -0
  278. cdpify-0.3.0/cdpify/events/dispatcher.py +97 -0
  279. cdpify-0.3.0/cdpify/events/router.py +91 -0
  280. cdpify-0.3.0/cdpify/executor.py +39 -0
  281. cdpify-0.3.0/cdpify/generator/__main__.py +77 -0
  282. cdpify-0.3.0/cdpify/generator/downloader.py +34 -0
  283. cdpify-0.3.0/cdpify/generator/formatting.py +22 -0
  284. cdpify-0.3.0/cdpify/generator/generator.py +59 -0
  285. cdpify-0.3.0/cdpify/generator/generators/__init__.py +3 -0
  286. cdpify-0.3.0/cdpify/generator/generators/accessors.py +20 -0
  287. cdpify-0.3.0/cdpify/generator/generators/commands.py +90 -0
  288. cdpify-0.3.0/cdpify/generator/generators/constants.py +7 -0
  289. cdpify-0.3.0/cdpify/generator/generators/context.py +59 -0
  290. cdpify-0.3.0/cdpify/generator/generators/domain.py +97 -0
  291. cdpify-0.3.0/cdpify/generator/generators/events.py +106 -0
  292. cdpify-0.3.0/cdpify/generator/generators/init.py +83 -0
  293. cdpify-0.3.0/cdpify/generator/generators/types.py +105 -0
  294. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/generator/generators/utils.py +13 -27
  295. cdpify-0.3.0/cdpify/generator/generators/views.py +90 -0
  296. cdpify-0.3.0/cdpify/generator/rendering.py +25 -0
  297. cdpify-0.2.11/cdpify/generator/models.py → cdpify-0.3.0/cdpify/generator/schemas.py +8 -8
  298. cdpify-0.3.0/cdpify/generator/templates/accessors.py.jinja2 +17 -0
  299. cdpify-0.3.0/cdpify/generator/templates/commands.py.jinja2 +38 -0
  300. cdpify-0.3.0/cdpify/generator/templates/domain.py.jinja2 +65 -0
  301. cdpify-0.3.0/cdpify/generator/templates/domain_init.py.jinja2 +22 -0
  302. cdpify-0.3.0/cdpify/generator/templates/events.py.jinja2 +40 -0
  303. cdpify-0.3.0/cdpify/generator/templates/root_init.py.jinja2 +9 -0
  304. cdpify-0.3.0/cdpify/generator/templates/types.py.jinja2 +33 -0
  305. cdpify-0.3.0/cdpify/session.py +54 -0
  306. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/shared/decorators.py +2 -5
  307. cdpify-0.3.0/cdpify/shared/naming.py +12 -0
  308. cdpify-0.3.0/cdpify/transport.py +29 -0
  309. cdpify-0.3.0/cdpify/transports/__init__.py +1 -0
  310. cdpify-0.3.0/cdpify/transports/websocket.py +256 -0
  311. cdpify-0.3.0/cdpify.egg-info/PKG-INFO +304 -0
  312. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify.egg-info/SOURCES.txt +146 -63
  313. cdpify-0.3.0/cdpify.egg-info/requires.txt +8 -0
  314. {cdpify-0.2.11 → cdpify-0.3.0}/pyproject.toml +24 -6
  315. cdpify-0.3.0/tests/test_client.py +239 -0
  316. cdpify-0.3.0/tests/test_codec.py +118 -0
  317. cdpify-0.3.0/tests/test_decorators_and_exceptions.py +42 -0
  318. cdpify-0.3.0/tests/test_dependency_boundaries.py +107 -0
  319. cdpify-0.3.0/tests/test_event_dispatcher.py +99 -0
  320. cdpify-0.3.0/tests/test_models.py +59 -0
  321. cdpify-0.3.0/tests/test_session.py +140 -0
  322. cdpify-0.3.0/tests/test_websocket_transport.py +161 -0
  323. cdpify-0.2.11/PKG-INFO +0 -182
  324. cdpify-0.2.11/README.md +0 -171
  325. cdpify-0.2.11/cdpify/__init__.py +0 -17
  326. cdpify-0.2.11/cdpify/client.py +0 -450
  327. cdpify-0.2.11/cdpify/domains/__init__.py +0 -91
  328. cdpify-0.2.11/cdpify/domains/accessibility/commands.py +0 -130
  329. cdpify-0.2.11/cdpify/domains/accessibility/types.py +0 -197
  330. cdpify-0.2.11/cdpify/domains/animation/commands.py +0 -104
  331. cdpify-0.2.11/cdpify/domains/animation/types.py +0 -82
  332. cdpify-0.2.11/cdpify/domains/audits/commands.py +0 -46
  333. cdpify-0.2.11/cdpify/domains/audits/types.py +0 -839
  334. cdpify-0.2.11/cdpify/domains/backgroundservice/types.py +0 -47
  335. cdpify-0.2.11/cdpify/domains/browser/commands.py +0 -243
  336. cdpify-0.2.11/cdpify/domains/browser/events.py +0 -43
  337. cdpify-0.2.11/cdpify/domains/browser/types.py +0 -123
  338. cdpify-0.2.11/cdpify/domains/cachestorage/commands.py +0 -94
  339. cdpify-0.2.11/cdpify/domains/cachestorage/events.py +0 -5
  340. cdpify-0.2.11/cdpify/domains/cachestorage/types.py +0 -68
  341. cdpify-0.2.11/cdpify/domains/cast/types.py +0 -15
  342. cdpify-0.2.11/cdpify/domains/console/types.py +0 -35
  343. cdpify-0.2.11/cdpify/domains/css/commands.py +0 -571
  344. cdpify-0.2.11/cdpify/domains/css/types.py +0 -566
  345. cdpify-0.2.11/cdpify/domains/debugger/commands.py +0 -482
  346. cdpify-0.2.11/cdpify/domains/debugger/events.py +0 -134
  347. cdpify-0.2.11/cdpify/domains/debugger/types.py +0 -141
  348. cdpify-0.2.11/cdpify/domains/deviceorientation/events.py +0 -5
  349. cdpify-0.2.11/cdpify/domains/dom/commands.py +0 -724
  350. cdpify-0.2.11/cdpify/domains/dom/events.py +0 -232
  351. cdpify-0.2.11/cdpify/domains/dom/types.py +0 -230
  352. cdpify-0.2.11/cdpify/domains/domdebugger/commands.py +0 -130
  353. cdpify-0.2.11/cdpify/domains/domdebugger/events.py +0 -5
  354. cdpify-0.2.11/cdpify/domains/domdebugger/types.py +0 -40
  355. cdpify-0.2.11/cdpify/domains/domsnapshot/commands.py +0 -65
  356. cdpify-0.2.11/cdpify/domains/domsnapshot/events.py +0 -5
  357. cdpify-0.2.11/cdpify/domains/domsnapshot/types.py +0 -209
  358. cdpify-0.2.11/cdpify/domains/domstorage/commands.py +0 -49
  359. cdpify-0.2.11/cdpify/domains/domstorage/events.py +0 -44
  360. cdpify-0.2.11/cdpify/domains/domstorage/types.py +0 -28
  361. cdpify-0.2.11/cdpify/domains/emulation/commands.py +0 -550
  362. cdpify-0.2.11/cdpify/domains/emulation/types.py +0 -194
  363. cdpify-0.2.11/cdpify/domains/eventbreakpoints/events.py +0 -5
  364. cdpify-0.2.11/cdpify/domains/fetch/commands.py +0 -145
  365. cdpify-0.2.11/cdpify/domains/fetch/events.py +0 -65
  366. cdpify-0.2.11/cdpify/domains/fetch/types.py +0 -65
  367. cdpify-0.2.11/cdpify/domains/heapprofiler/commands.py +0 -99
  368. cdpify-0.2.11/cdpify/domains/heapprofiler/types.py +0 -51
  369. cdpify-0.2.11/cdpify/domains/indexeddb/commands.py +0 -141
  370. cdpify-0.2.11/cdpify/domains/indexeddb/events.py +0 -5
  371. cdpify-0.2.11/cdpify/domains/indexeddb/types.py +0 -94
  372. cdpify-0.2.11/cdpify/domains/input/commands.py +0 -213
  373. cdpify-0.2.11/cdpify/domains/input/types.py +0 -49
  374. cdpify-0.2.11/cdpify/domains/io/commands.py +0 -60
  375. cdpify-0.2.11/cdpify/domains/io/events.py +0 -5
  376. cdpify-0.2.11/cdpify/domains/layertree/commands.py +0 -125
  377. cdpify-0.2.11/cdpify/domains/layertree/types.py +0 -85
  378. cdpify-0.2.11/cdpify/domains/log/types.py +0 -63
  379. cdpify-0.2.11/cdpify/domains/media/types.py +0 -79
  380. cdpify-0.2.11/cdpify/domains/memory/commands.py +0 -82
  381. cdpify-0.2.11/cdpify/domains/memory/events.py +0 -5
  382. cdpify-0.2.11/cdpify/domains/memory/types.py +0 -57
  383. cdpify-0.2.11/cdpify/domains/network/commands.py +0 -545
  384. cdpify-0.2.11/cdpify/domains/network/events.py +0 -646
  385. cdpify-0.2.11/cdpify/domains/network/types.py +0 -1198
  386. cdpify-0.2.11/cdpify/domains/overlay/commands.py +0 -331
  387. cdpify-0.2.11/cdpify/domains/overlay/types.py +0 -220
  388. cdpify-0.2.11/cdpify/domains/page/commands.py +0 -690
  389. cdpify-0.2.11/cdpify/domains/page/events.py +0 -367
  390. cdpify-0.2.11/cdpify/domains/page/types.py +0 -817
  391. cdpify-0.2.11/cdpify/domains/profiler/commands.py +0 -68
  392. cdpify-0.2.11/cdpify/domains/profiler/events.py +0 -57
  393. cdpify-0.2.11/cdpify/domains/profiler/types.py +0 -82
  394. cdpify-0.2.11/cdpify/domains/runtime/commands.py +0 -301
  395. cdpify-0.2.11/cdpify/domains/runtime/events.py +0 -132
  396. cdpify-0.2.11/cdpify/domains/runtime/types.py +0 -374
  397. cdpify-0.2.11/cdpify/domains/schema/events.py +0 -5
  398. cdpify-0.2.11/cdpify/domains/security/events.py +0 -56
  399. cdpify-0.2.11/cdpify/domains/security/types.py +0 -114
  400. cdpify-0.2.11/cdpify/domains/serviceworker/commands.py +0 -78
  401. cdpify-0.2.11/cdpify/domains/serviceworker/events.py +0 -34
  402. cdpify-0.2.11/cdpify/domains/serviceworker/types.py +0 -66
  403. cdpify-0.2.11/cdpify/domains/storage/client.py +0 -700
  404. cdpify-0.2.11/cdpify/domains/storage/commands.py +0 -409
  405. cdpify-0.2.11/cdpify/domains/storage/events.py +0 -175
  406. cdpify-0.2.11/cdpify/domains/storage/types.py +0 -228
  407. cdpify-0.2.11/cdpify/domains/systeminfo/commands.py +0 -45
  408. cdpify-0.2.11/cdpify/domains/systeminfo/events.py +0 -5
  409. cdpify-0.2.11/cdpify/domains/systeminfo/types.py +0 -96
  410. cdpify-0.2.11/cdpify/domains/target/commands.py +0 -292
  411. cdpify-0.2.11/cdpify/domains/target/events.py +0 -97
  412. cdpify-0.2.11/cdpify/domains/target/types.py +0 -67
  413. cdpify-0.2.11/cdpify/domains/tracing/commands.py +0 -77
  414. cdpify-0.2.11/cdpify/domains/tracing/events.py +0 -55
  415. cdpify-0.2.11/cdpify/domains/tracing/types.py +0 -62
  416. cdpify-0.2.11/cdpify/domains/webaudio/events.py +0 -168
  417. cdpify-0.2.11/cdpify/domains/webaudio/types.py +0 -118
  418. cdpify-0.2.11/cdpify/domains/webauthn/commands.py +0 -169
  419. cdpify-0.2.11/cdpify/domains/webauthn/events.py +0 -61
  420. cdpify-0.2.11/cdpify/domains/webauthn/types.py +0 -51
  421. cdpify-0.2.11/cdpify/events/__init__.py +0 -5
  422. cdpify-0.2.11/cdpify/events/dispatcher.py +0 -50
  423. cdpify-0.2.11/cdpify/generator/__main__.py +0 -27
  424. cdpify-0.2.11/cdpify/generator/config.py +0 -104
  425. cdpify-0.2.11/cdpify/generator/constants.py +0 -2
  426. cdpify-0.2.11/cdpify/generator/downloader.py +0 -43
  427. cdpify-0.2.11/cdpify/generator/generator.py +0 -140
  428. cdpify-0.2.11/cdpify/generator/generators/__init__.py +0 -13
  429. cdpify-0.2.11/cdpify/generator/generators/base.py +0 -117
  430. cdpify-0.2.11/cdpify/generator/generators/client.py +0 -257
  431. cdpify-0.2.11/cdpify/generator/generators/commands.py +0 -150
  432. cdpify-0.2.11/cdpify/generator/generators/events.py +0 -145
  433. cdpify-0.2.11/cdpify/generator/generators/init.py +0 -103
  434. cdpify-0.2.11/cdpify/generator/generators/types.py +0 -161
  435. cdpify-0.2.11/cdpify/generator/parser.py +0 -23
  436. cdpify-0.2.11/cdpify/logging.py +0 -97
  437. cdpify-0.2.11/cdpify/shared/models.py +0 -155
  438. cdpify-0.2.11/cdpify.egg-info/PKG-INFO +0 -182
  439. cdpify-0.2.11/cdpify.egg-info/requires.txt +0 -4
  440. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify/exceptions.py +0 -0
  441. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify.egg-info/dependency_links.txt +0 -0
  442. {cdpify-0.2.11 → cdpify-0.3.0}/cdpify.egg-info/top_level.txt +0 -0
  443. {cdpify-0.2.11 → cdpify-0.3.0}/setup.cfg +0 -0
cdpify-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,304 @@
1
+ Metadata-Version: 2.4
2
+ Name: cdpify
3
+ Version: 0.3.0
4
+ Summary: A Python client for the Chrome DevTools Protocol (CDP) optimized for DX.
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Classifier: Programming Language :: Python :: 3.13
8
+ Classifier: Programming Language :: Python :: 3.14
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+ Provides-Extra: websocket
12
+ Requires-Dist: websockets>=15.0.1; extra == "websocket"
13
+ Provides-Extra: generator
14
+ Requires-Dist: jinja2>=3.1.6; extra == "generator"
15
+ Requires-Dist: pydantic>=2.12.5; extra == "generator"
16
+ Requires-Dist: ruff>=0.14.10; extra == "generator"
17
+
18
+ # cdpify
19
+
20
+ 🚀 **An async, typed Python client for the Chrome DevTools Protocol.**
21
+
22
+ `cdpify` turns the Chrome DevTools Protocol (CDP) into a Pythonic, IDE-friendly
23
+ API. Commands, results, events, and protocol types are generated from the
24
+ official CDP specifications, so you get autocomplete and typed responses
25
+ without working with raw JSON messages.
26
+
27
+ ## Contents
28
+
29
+ - [Why cdpify?](#why-cdpify)
30
+ - [Installation](#installation)
31
+ - [Quick start](#quick-start)
32
+ - [Supported domains](#supported-domains)
33
+ - [Listening for events](#listening-for-events)
34
+ - [Working with target sessions](#working-with-target-sessions)
35
+ - [Configuration](#configuration)
36
+ - [Development](#development)
37
+ - [Resources](#resources)
38
+
39
+ ## Why cdpify?
40
+
41
+ - **Typed by default** — generated models for commands, results, events, and
42
+ shared protocol types
43
+ - **Complete domain coverage** — access all 58 generated CDP domains through
44
+ properties such as `client.page`, `client.network`, and `client.runtime`
45
+ - **Async throughout** — transport-neutral core with an optional WebSocket
46
+ implementation
47
+ - **Typed event streams** — consume CDP events with async iterators
48
+ - **Multi-target support** — use immutable, concurrency-safe session views
49
+ - **Low-level protocol access** — execute any CDP method through `execute()`
50
+ when needed
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install "cdpify[websocket]"
56
+ ```
57
+
58
+ Requires Python 3.12 or newer. The WebSocket extra provides the recommended
59
+ default transport used by `Client(url)`. Install `cdpify` without an extra when
60
+ supplying your own `Transport` implementation.
61
+
62
+ Install the generator dependencies only when regenerating protocol modules:
63
+
64
+ ```bash
65
+ pip install "cdpify[generator]"
66
+ ```
67
+
68
+ ## Quick start
69
+
70
+ Start Chrome or Chromium with remote debugging enabled, then obtain a page's
71
+ `webSocketDebuggerUrl` from `http://localhost:9222/json`.
72
+
73
+ ```python
74
+ import asyncio
75
+ import json
76
+ from urllib.request import urlopen
77
+
78
+ from cdpify import Client
79
+
80
+
81
+ def get_websocket_url() -> str:
82
+ with urlopen("http://localhost:9222/json", timeout=5) as response:
83
+ return json.load(response)[0]["webSocketDebuggerUrl"]
84
+
85
+
86
+ async def main() -> None:
87
+ ws_url = get_websocket_url()
88
+
89
+ async with Client(ws_url) as client:
90
+ await client.page.navigate(url="https://example.com")
91
+
92
+ result = await client.runtime.evaluate(
93
+ expression="document.title",
94
+ return_by_value=True,
95
+ )
96
+ print(result.result.value)
97
+
98
+
99
+ asyncio.run(main())
100
+ ```
101
+
102
+ Domains are available as lazy properties on `Client`. Parameters use
103
+ Python's `snake_case`; `cdpify` handles conversion to and from CDP's wire format.
104
+
105
+ ## Supported domains
106
+
107
+ The generated client currently includes all 58 domains from the bundled CDP
108
+ specifications. Each domain is available as a lazy property on `Client` and
109
+ `CDPSession`:
110
+
111
+ | CDP domain | Python accessor | CDP domain | Python accessor |
112
+ | --- | --- | --- | --- |
113
+ | `Accessibility` | `client.accessibility` | `IndexedDB` | `client.indexed_db` |
114
+ | `Ads` | `client.ads` | `Input` | `client.input` |
115
+ | `Animation` | `client.animation` | `Inspector` | `client.inspector` |
116
+ | `Audits` | `client.audits` | `IO` | `client.io` |
117
+ | `Autofill` | `client.autofill` | `LayerTree` | `client.layer_tree` |
118
+ | `BackgroundService` | `client.background_service` | `Log` | `client.log` |
119
+ | `BluetoothEmulation` | `client.bluetooth_emulation` | `Media` | `client.media` |
120
+ | `Browser` | `client.browser` | `Memory` | `client.memory` |
121
+ | `CacheStorage` | `client.cache_storage` | `Network` | `client.network` |
122
+ | `Cast` | `client.cast` | `Overlay` | `client.overlay` |
123
+ | `Console` | `client.console` | `Page` | `client.page` |
124
+ | `CrashReportContext` | `client.crash_report_context` | `Performance` | `client.performance` |
125
+ | `CSS` | `client.css` | `PerformanceTimeline` | `client.performance_timeline` |
126
+ | `Debugger` | `client.debugger` | `Preload` | `client.preload` |
127
+ | `DeviceAccess` | `client.device_access` | `Profiler` | `client.profiler` |
128
+ | `DeviceOrientation` | `client.device_orientation` | `PWA` | `client.pwa` |
129
+ | `DigitalCredentials` | `client.digital_credentials` | `Runtime` | `client.runtime` |
130
+ | `DOM` | `client.dom` | `Schema` | `client.schema` |
131
+ | `DOMDebugger` | `client.dom_debugger` | `Security` | `client.security` |
132
+ | `DOMSnapshot` | `client.dom_snapshot` | `ServiceWorker` | `client.service_worker` |
133
+ | `DOMStorage` | `client.dom_storage` | `SmartCardEmulation` | `client.smart_card_emulation` |
134
+ | `Emulation` | `client.emulation` | `Storage` | `client.storage` |
135
+ | `EventBreakpoints` | `client.event_breakpoints` | `SystemInfo` | `client.system_info` |
136
+ | `Extensions` | `client.extensions` | `Target` | `client.target` |
137
+ | `FedCm` | `client.fed_cm` | `Tethering` | `client.tethering` |
138
+ | `Fetch` | `client.fetch` | `Tracing` | `client.tracing` |
139
+ | `FileSystem` | `client.file_system` | `WebAudio` | `client.web_audio` |
140
+ | `HeadlessExperimental` | `client.headless_experimental` | `WebAuthn` | `client.web_authn` |
141
+ | `HeapProfiler` | `client.heap_profiler` | `WebMCP` | `client.web_mcp` |
142
+
143
+ ## Listening for events
144
+
145
+ Events are exposed as typed async streams:
146
+
147
+ ```python
148
+ from cdpify.domains.network.events import NetworkEvent, RequestWillBeSentEvent
149
+
150
+
151
+ await client.network.enable()
152
+
153
+ async for event in client.listen(
154
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
155
+ event_type=RequestWillBeSentEvent,
156
+ ):
157
+ print(event.request.method, event.request.url)
158
+ ```
159
+
160
+ `client.listen()` accepts an optional `timeout` in seconds and yields only
161
+ events from the root connection. A session view applies the same rule to its
162
+ bound target:
163
+
164
+ ```python
165
+ tab = client.session("session-id")
166
+
167
+ async for event in tab.listen(
168
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
169
+ event_type=RequestWillBeSentEvent,
170
+ ):
171
+ # This stream contains events from this session only.
172
+ print(event.request.url)
173
+ ```
174
+
175
+ To observe the root connection and all attached sessions together, use
176
+ `listen_all()`. Routing metadata is returned separately from the generated CDP
177
+ event model:
178
+
179
+ ```python
180
+ async for received in client.listen_all(
181
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
182
+ event_type=RequestWillBeSentEvent,
183
+ ):
184
+ print(received.session_id, received.value.request.url)
185
+ ```
186
+
187
+ `received.session_id` is `None` for a root event. Generated event dataclasses
188
+ contain only fields defined by the CDP specification.
189
+
190
+ ## Working with target sessions
191
+
192
+ Attach to a target in flat mode and create an immutable session view with
193
+ `client.session()`. Every generated command on that view is routed to the bound
194
+ session:
195
+
196
+ ```python
197
+ from cdpify import Client
198
+
199
+
200
+ async with Client(browser_ws_url) as root_client:
201
+ attached = await root_client.target.attach_to_target(
202
+ target_id="target-id",
203
+ flatten=True,
204
+ )
205
+ tab = root_client.session(attached.session_id)
206
+
207
+ await tab.page.enable()
208
+ await tab.runtime.evaluate(expression="console.log('Hello from CDP')")
209
+ ```
210
+
211
+ There is no mutable "active session". Create one view per attached target and
212
+ use them safely from concurrent tasks:
213
+
214
+ ```python
215
+ import asyncio
216
+
217
+
218
+ tab_a = root_client.session(session_a)
219
+ tab_b = root_client.session(session_b)
220
+
221
+ await asyncio.gather(
222
+ tab_a.runtime.evaluate(expression="document.title"),
223
+ tab_b.runtime.evaluate(expression="document.title"),
224
+ )
225
+ ```
226
+
227
+ Session routing is transport metadata, not a generated command parameter.
228
+ Generated methods therefore never accept an additional routing `session_id`.
229
+ A real `sessionId` declared by the CDP specification remains a normal typed
230
+ parameter. For low-level access, `root_client.execute()` optionally accepts a
231
+ session ID, while `tab.execute()` is always bound and cannot be overridden:
232
+
233
+ ```python
234
+ await root_client.execute("Page.enable", session_id=session_a)
235
+ await tab.execute("Runtime.evaluate", {"expression": "1 + 1"})
236
+ ```
237
+
238
+ ## Configuration
239
+
240
+ ```python
241
+ client = Client(
242
+ url="ws://localhost:9222/devtools/browser/...",
243
+ additional_headers={"Authorization": "Bearer token"},
244
+ max_frame_size=100 * 1024 * 1024,
245
+ default_timeout=30.0,
246
+ )
247
+ ```
248
+
249
+ For another transport protocol, implement the exported `Transport` protocol
250
+ and inject it directly:
251
+
252
+ ```python
253
+ from cdpify import Client
254
+
255
+ client = Client(transport=my_transport)
256
+ ```
257
+
258
+ For methods not covered by the generated API, use the low-level escape hatch:
259
+
260
+ ```python
261
+ result = await client.execute(
262
+ "Runtime.evaluate",
263
+ {"expression": "1 + 1", "returnByValue": True},
264
+ )
265
+ ```
266
+
267
+ ## Development
268
+
269
+ Install the project and its development dependencies with
270
+ [uv](https://docs.astral.sh/uv/):
271
+
272
+ ```bash
273
+ uv sync --dev
274
+ uv run pytest
275
+ uv run ruff check . --exclude cdpify/domains
276
+ ```
277
+
278
+ To download the latest protocol definitions and regenerate all domain clients:
279
+
280
+ ```bash
281
+ uv run python -m cdpify.generator
282
+ ```
283
+
284
+ Generate only selected domains by repeating `--domain`:
285
+
286
+ ```bash
287
+ uv run python -m cdpify.generator --domain Page --domain Runtime
288
+ ```
289
+
290
+ Use `--spec-dir` and `--output-dir` to override where downloaded specifications
291
+ and generated modules are written.
292
+
293
+ The generated output lives in `cdpify/domains/` and should not be edited by
294
+ hand. The repository also refreshes the upstream specification automatically
295
+ once a week and opens a pull request when generated code changes.
296
+
297
+ ## Resources
298
+
299
+ - [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/)
300
+ - [Chrome DevTools Protocol repository](https://github.com/ChromeDevTools/devtools-protocol)
301
+ - [Examples](examples)
302
+
303
+ The code-generation approach was inspired by
304
+ [`cdp-use`](https://github.com/browser-use/cdp-use).
cdpify-0.3.0/README.md ADDED
@@ -0,0 +1,287 @@
1
+ # cdpify
2
+
3
+ 🚀 **An async, typed Python client for the Chrome DevTools Protocol.**
4
+
5
+ `cdpify` turns the Chrome DevTools Protocol (CDP) into a Pythonic, IDE-friendly
6
+ API. Commands, results, events, and protocol types are generated from the
7
+ official CDP specifications, so you get autocomplete and typed responses
8
+ without working with raw JSON messages.
9
+
10
+ ## Contents
11
+
12
+ - [Why cdpify?](#why-cdpify)
13
+ - [Installation](#installation)
14
+ - [Quick start](#quick-start)
15
+ - [Supported domains](#supported-domains)
16
+ - [Listening for events](#listening-for-events)
17
+ - [Working with target sessions](#working-with-target-sessions)
18
+ - [Configuration](#configuration)
19
+ - [Development](#development)
20
+ - [Resources](#resources)
21
+
22
+ ## Why cdpify?
23
+
24
+ - **Typed by default** — generated models for commands, results, events, and
25
+ shared protocol types
26
+ - **Complete domain coverage** — access all 58 generated CDP domains through
27
+ properties such as `client.page`, `client.network`, and `client.runtime`
28
+ - **Async throughout** — transport-neutral core with an optional WebSocket
29
+ implementation
30
+ - **Typed event streams** — consume CDP events with async iterators
31
+ - **Multi-target support** — use immutable, concurrency-safe session views
32
+ - **Low-level protocol access** — execute any CDP method through `execute()`
33
+ when needed
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install "cdpify[websocket]"
39
+ ```
40
+
41
+ Requires Python 3.12 or newer. The WebSocket extra provides the recommended
42
+ default transport used by `Client(url)`. Install `cdpify` without an extra when
43
+ supplying your own `Transport` implementation.
44
+
45
+ Install the generator dependencies only when regenerating protocol modules:
46
+
47
+ ```bash
48
+ pip install "cdpify[generator]"
49
+ ```
50
+
51
+ ## Quick start
52
+
53
+ Start Chrome or Chromium with remote debugging enabled, then obtain a page's
54
+ `webSocketDebuggerUrl` from `http://localhost:9222/json`.
55
+
56
+ ```python
57
+ import asyncio
58
+ import json
59
+ from urllib.request import urlopen
60
+
61
+ from cdpify import Client
62
+
63
+
64
+ def get_websocket_url() -> str:
65
+ with urlopen("http://localhost:9222/json", timeout=5) as response:
66
+ return json.load(response)[0]["webSocketDebuggerUrl"]
67
+
68
+
69
+ async def main() -> None:
70
+ ws_url = get_websocket_url()
71
+
72
+ async with Client(ws_url) as client:
73
+ await client.page.navigate(url="https://example.com")
74
+
75
+ result = await client.runtime.evaluate(
76
+ expression="document.title",
77
+ return_by_value=True,
78
+ )
79
+ print(result.result.value)
80
+
81
+
82
+ asyncio.run(main())
83
+ ```
84
+
85
+ Domains are available as lazy properties on `Client`. Parameters use
86
+ Python's `snake_case`; `cdpify` handles conversion to and from CDP's wire format.
87
+
88
+ ## Supported domains
89
+
90
+ The generated client currently includes all 58 domains from the bundled CDP
91
+ specifications. Each domain is available as a lazy property on `Client` and
92
+ `CDPSession`:
93
+
94
+ | CDP domain | Python accessor | CDP domain | Python accessor |
95
+ | --- | --- | --- | --- |
96
+ | `Accessibility` | `client.accessibility` | `IndexedDB` | `client.indexed_db` |
97
+ | `Ads` | `client.ads` | `Input` | `client.input` |
98
+ | `Animation` | `client.animation` | `Inspector` | `client.inspector` |
99
+ | `Audits` | `client.audits` | `IO` | `client.io` |
100
+ | `Autofill` | `client.autofill` | `LayerTree` | `client.layer_tree` |
101
+ | `BackgroundService` | `client.background_service` | `Log` | `client.log` |
102
+ | `BluetoothEmulation` | `client.bluetooth_emulation` | `Media` | `client.media` |
103
+ | `Browser` | `client.browser` | `Memory` | `client.memory` |
104
+ | `CacheStorage` | `client.cache_storage` | `Network` | `client.network` |
105
+ | `Cast` | `client.cast` | `Overlay` | `client.overlay` |
106
+ | `Console` | `client.console` | `Page` | `client.page` |
107
+ | `CrashReportContext` | `client.crash_report_context` | `Performance` | `client.performance` |
108
+ | `CSS` | `client.css` | `PerformanceTimeline` | `client.performance_timeline` |
109
+ | `Debugger` | `client.debugger` | `Preload` | `client.preload` |
110
+ | `DeviceAccess` | `client.device_access` | `Profiler` | `client.profiler` |
111
+ | `DeviceOrientation` | `client.device_orientation` | `PWA` | `client.pwa` |
112
+ | `DigitalCredentials` | `client.digital_credentials` | `Runtime` | `client.runtime` |
113
+ | `DOM` | `client.dom` | `Schema` | `client.schema` |
114
+ | `DOMDebugger` | `client.dom_debugger` | `Security` | `client.security` |
115
+ | `DOMSnapshot` | `client.dom_snapshot` | `ServiceWorker` | `client.service_worker` |
116
+ | `DOMStorage` | `client.dom_storage` | `SmartCardEmulation` | `client.smart_card_emulation` |
117
+ | `Emulation` | `client.emulation` | `Storage` | `client.storage` |
118
+ | `EventBreakpoints` | `client.event_breakpoints` | `SystemInfo` | `client.system_info` |
119
+ | `Extensions` | `client.extensions` | `Target` | `client.target` |
120
+ | `FedCm` | `client.fed_cm` | `Tethering` | `client.tethering` |
121
+ | `Fetch` | `client.fetch` | `Tracing` | `client.tracing` |
122
+ | `FileSystem` | `client.file_system` | `WebAudio` | `client.web_audio` |
123
+ | `HeadlessExperimental` | `client.headless_experimental` | `WebAuthn` | `client.web_authn` |
124
+ | `HeapProfiler` | `client.heap_profiler` | `WebMCP` | `client.web_mcp` |
125
+
126
+ ## Listening for events
127
+
128
+ Events are exposed as typed async streams:
129
+
130
+ ```python
131
+ from cdpify.domains.network.events import NetworkEvent, RequestWillBeSentEvent
132
+
133
+
134
+ await client.network.enable()
135
+
136
+ async for event in client.listen(
137
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
138
+ event_type=RequestWillBeSentEvent,
139
+ ):
140
+ print(event.request.method, event.request.url)
141
+ ```
142
+
143
+ `client.listen()` accepts an optional `timeout` in seconds and yields only
144
+ events from the root connection. A session view applies the same rule to its
145
+ bound target:
146
+
147
+ ```python
148
+ tab = client.session("session-id")
149
+
150
+ async for event in tab.listen(
151
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
152
+ event_type=RequestWillBeSentEvent,
153
+ ):
154
+ # This stream contains events from this session only.
155
+ print(event.request.url)
156
+ ```
157
+
158
+ To observe the root connection and all attached sessions together, use
159
+ `listen_all()`. Routing metadata is returned separately from the generated CDP
160
+ event model:
161
+
162
+ ```python
163
+ async for received in client.listen_all(
164
+ event_name=NetworkEvent.REQUEST_WILL_BE_SENT,
165
+ event_type=RequestWillBeSentEvent,
166
+ ):
167
+ print(received.session_id, received.value.request.url)
168
+ ```
169
+
170
+ `received.session_id` is `None` for a root event. Generated event dataclasses
171
+ contain only fields defined by the CDP specification.
172
+
173
+ ## Working with target sessions
174
+
175
+ Attach to a target in flat mode and create an immutable session view with
176
+ `client.session()`. Every generated command on that view is routed to the bound
177
+ session:
178
+
179
+ ```python
180
+ from cdpify import Client
181
+
182
+
183
+ async with Client(browser_ws_url) as root_client:
184
+ attached = await root_client.target.attach_to_target(
185
+ target_id="target-id",
186
+ flatten=True,
187
+ )
188
+ tab = root_client.session(attached.session_id)
189
+
190
+ await tab.page.enable()
191
+ await tab.runtime.evaluate(expression="console.log('Hello from CDP')")
192
+ ```
193
+
194
+ There is no mutable "active session". Create one view per attached target and
195
+ use them safely from concurrent tasks:
196
+
197
+ ```python
198
+ import asyncio
199
+
200
+
201
+ tab_a = root_client.session(session_a)
202
+ tab_b = root_client.session(session_b)
203
+
204
+ await asyncio.gather(
205
+ tab_a.runtime.evaluate(expression="document.title"),
206
+ tab_b.runtime.evaluate(expression="document.title"),
207
+ )
208
+ ```
209
+
210
+ Session routing is transport metadata, not a generated command parameter.
211
+ Generated methods therefore never accept an additional routing `session_id`.
212
+ A real `sessionId` declared by the CDP specification remains a normal typed
213
+ parameter. For low-level access, `root_client.execute()` optionally accepts a
214
+ session ID, while `tab.execute()` is always bound and cannot be overridden:
215
+
216
+ ```python
217
+ await root_client.execute("Page.enable", session_id=session_a)
218
+ await tab.execute("Runtime.evaluate", {"expression": "1 + 1"})
219
+ ```
220
+
221
+ ## Configuration
222
+
223
+ ```python
224
+ client = Client(
225
+ url="ws://localhost:9222/devtools/browser/...",
226
+ additional_headers={"Authorization": "Bearer token"},
227
+ max_frame_size=100 * 1024 * 1024,
228
+ default_timeout=30.0,
229
+ )
230
+ ```
231
+
232
+ For another transport protocol, implement the exported `Transport` protocol
233
+ and inject it directly:
234
+
235
+ ```python
236
+ from cdpify import Client
237
+
238
+ client = Client(transport=my_transport)
239
+ ```
240
+
241
+ For methods not covered by the generated API, use the low-level escape hatch:
242
+
243
+ ```python
244
+ result = await client.execute(
245
+ "Runtime.evaluate",
246
+ {"expression": "1 + 1", "returnByValue": True},
247
+ )
248
+ ```
249
+
250
+ ## Development
251
+
252
+ Install the project and its development dependencies with
253
+ [uv](https://docs.astral.sh/uv/):
254
+
255
+ ```bash
256
+ uv sync --dev
257
+ uv run pytest
258
+ uv run ruff check . --exclude cdpify/domains
259
+ ```
260
+
261
+ To download the latest protocol definitions and regenerate all domain clients:
262
+
263
+ ```bash
264
+ uv run python -m cdpify.generator
265
+ ```
266
+
267
+ Generate only selected domains by repeating `--domain`:
268
+
269
+ ```bash
270
+ uv run python -m cdpify.generator --domain Page --domain Runtime
271
+ ```
272
+
273
+ Use `--spec-dir` and `--output-dir` to override where downloaded specifications
274
+ and generated modules are written.
275
+
276
+ The generated output lives in `cdpify/domains/` and should not be edited by
277
+ hand. The repository also refreshes the upstream specification automatically
278
+ once a week and opens a pull request when generated code changes.
279
+
280
+ ## Resources
281
+
282
+ - [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/)
283
+ - [Chrome DevTools Protocol repository](https://github.com/ChromeDevTools/devtools-protocol)
284
+ - [Examples](examples)
285
+
286
+ The code-generation approach was inspired by
287
+ [`cdp-use`](https://github.com/browser-use/cdp-use).
@@ -0,0 +1,27 @@
1
+ from .client import Client
2
+ from .codec import decode_cdp, encode_cdp
3
+ from .events import ReceivedEvent
4
+ from .exceptions import (
5
+ CDPCommandException,
6
+ CDPConnectionException,
7
+ CDPException,
8
+ CDPTimeoutException,
9
+ )
10
+ from .executor import CommandExecutor
11
+ from .session import CDPSession
12
+ from .transport import Transport, TransportEvent
13
+
14
+ __all__ = [
15
+ "Client",
16
+ "CDPSession",
17
+ "CommandExecutor",
18
+ "ReceivedEvent",
19
+ "decode_cdp",
20
+ "encode_cdp",
21
+ "Transport",
22
+ "TransportEvent",
23
+ "CDPException",
24
+ "CDPConnectionException",
25
+ "CDPCommandException",
26
+ "CDPTimeoutException",
27
+ ]