ghostcrawl 2.1.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 (146) hide show
  1. ghostcrawl-2.1.0/LICENSE +201 -0
  2. ghostcrawl-2.1.0/MANIFEST.in +9 -0
  3. ghostcrawl-2.1.0/PKG-INFO +211 -0
  4. ghostcrawl-2.1.0/README.md +182 -0
  5. ghostcrawl-2.1.0/ghostcrawl/__init__.py +271 -0
  6. ghostcrawl-2.1.0/ghostcrawl/_default_clients.py +30 -0
  7. ghostcrawl-2.1.0/ghostcrawl/_ghostcrawl.py +418 -0
  8. ghostcrawl-2.1.0/ghostcrawl/audit/__init__.py +34 -0
  9. ghostcrawl-2.1.0/ghostcrawl/audit/client.py +194 -0
  10. ghostcrawl-2.1.0/ghostcrawl/audit/raw_client.py +218 -0
  11. ghostcrawl-2.1.0/ghostcrawl/audit/types/__init__.py +34 -0
  12. ghostcrawl-2.1.0/ghostcrawl/audit/types/list_events_audit_request_outcome.py +5 -0
  13. ghostcrawl-2.1.0/ghostcrawl/auth/__init__.py +4 -0
  14. ghostcrawl-2.1.0/ghostcrawl/auth/client.py +569 -0
  15. ghostcrawl-2.1.0/ghostcrawl/auth/raw_client.py +846 -0
  16. ghostcrawl-2.1.0/ghostcrawl/auth_tokens/__init__.py +4 -0
  17. ghostcrawl-2.1.0/ghostcrawl/auth_tokens/client.py +267 -0
  18. ghostcrawl-2.1.0/ghostcrawl/auth_tokens/raw_client.py +339 -0
  19. ghostcrawl-2.1.0/ghostcrawl/branded.py +177 -0
  20. ghostcrawl-2.1.0/ghostcrawl/budgets/__init__.py +4 -0
  21. ghostcrawl-2.1.0/ghostcrawl/budgets/client.py +490 -0
  22. ghostcrawl-2.1.0/ghostcrawl/budgets/raw_client.py +630 -0
  23. ghostcrawl-2.1.0/ghostcrawl/cli/__init__.py +17 -0
  24. ghostcrawl-2.1.0/ghostcrawl/cli/_batch.py +240 -0
  25. ghostcrawl-2.1.0/ghostcrawl/cli/_config_store.py +60 -0
  26. ghostcrawl-2.1.0/ghostcrawl/cli/_fern_raw.py +35 -0
  27. ghostcrawl-2.1.0/ghostcrawl/cli/install.py +103 -0
  28. ghostcrawl-2.1.0/ghostcrawl/cli/main.py +897 -0
  29. ghostcrawl-2.1.0/ghostcrawl/client.py +765 -0
  30. ghostcrawl-2.1.0/ghostcrawl/core/__init__.py +127 -0
  31. ghostcrawl-2.1.0/ghostcrawl/core/api_error.py +23 -0
  32. ghostcrawl-2.1.0/ghostcrawl/core/client_wrapper.py +101 -0
  33. ghostcrawl-2.1.0/ghostcrawl/core/datetime_utils.py +70 -0
  34. ghostcrawl-2.1.0/ghostcrawl/core/file.py +67 -0
  35. ghostcrawl-2.1.0/ghostcrawl/core/force_multipart.py +18 -0
  36. ghostcrawl-2.1.0/ghostcrawl/core/http_client.py +839 -0
  37. ghostcrawl-2.1.0/ghostcrawl/core/http_response.py +59 -0
  38. ghostcrawl-2.1.0/ghostcrawl/core/http_sse/__init__.py +42 -0
  39. ghostcrawl-2.1.0/ghostcrawl/core/http_sse/_api.py +148 -0
  40. ghostcrawl-2.1.0/ghostcrawl/core/http_sse/_decoders.py +61 -0
  41. ghostcrawl-2.1.0/ghostcrawl/core/http_sse/_exceptions.py +7 -0
  42. ghostcrawl-2.1.0/ghostcrawl/core/http_sse/_models.py +17 -0
  43. ghostcrawl-2.1.0/ghostcrawl/core/jsonable_encoder.py +120 -0
  44. ghostcrawl-2.1.0/ghostcrawl/core/logging.py +107 -0
  45. ghostcrawl-2.1.0/ghostcrawl/core/parse_error.py +36 -0
  46. ghostcrawl-2.1.0/ghostcrawl/core/pydantic_utilities.py +634 -0
  47. ghostcrawl-2.1.0/ghostcrawl/core/query_encoder.py +58 -0
  48. ghostcrawl-2.1.0/ghostcrawl/core/remove_none_from_dict.py +11 -0
  49. ghostcrawl-2.1.0/ghostcrawl/core/request_options.py +35 -0
  50. ghostcrawl-2.1.0/ghostcrawl/core/serialization.py +276 -0
  51. ghostcrawl-2.1.0/ghostcrawl/crawl_runs/__init__.py +4 -0
  52. ghostcrawl-2.1.0/ghostcrawl/crawl_runs/client.py +437 -0
  53. ghostcrawl-2.1.0/ghostcrawl/crawl_runs/raw_client.py +638 -0
  54. ghostcrawl-2.1.0/ghostcrawl/datasets/__init__.py +4 -0
  55. ghostcrawl-2.1.0/ghostcrawl/datasets/client.py +509 -0
  56. ghostcrawl-2.1.0/ghostcrawl/datasets/raw_client.py +712 -0
  57. ghostcrawl-2.1.0/ghostcrawl/errors/__init__.py +34 -0
  58. ghostcrawl-2.1.0/ghostcrawl/errors/identity_errors.py +133 -0
  59. ghostcrawl-2.1.0/ghostcrawl/errors/unprocessable_entity_error.py +11 -0
  60. ghostcrawl-2.1.0/ghostcrawl/identity/__init__.py +17 -0
  61. ghostcrawl-2.1.0/ghostcrawl/identity/client.py +195 -0
  62. ghostcrawl-2.1.0/ghostcrawl/identity/types.py +58 -0
  63. ghostcrawl-2.1.0/ghostcrawl/management/__init__.py +4 -0
  64. ghostcrawl-2.1.0/ghostcrawl/management/client.py +108 -0
  65. ghostcrawl-2.1.0/ghostcrawl/management/raw_client.py +109 -0
  66. ghostcrawl-2.1.0/ghostcrawl/mcp/__init__.py +25 -0
  67. ghostcrawl-2.1.0/ghostcrawl/mcp/wrapper.py +353 -0
  68. ghostcrawl-2.1.0/ghostcrawl/mfa/__init__.py +4 -0
  69. ghostcrawl-2.1.0/ghostcrawl/mfa/client.py +394 -0
  70. ghostcrawl-2.1.0/ghostcrawl/mfa/raw_client.py +587 -0
  71. ghostcrawl-2.1.0/ghostcrawl/oauth/__init__.py +4 -0
  72. ghostcrawl-2.1.0/ghostcrawl/oauth/client.py +764 -0
  73. ghostcrawl-2.1.0/ghostcrawl/oauth/raw_client.py +1123 -0
  74. ghostcrawl-2.1.0/ghostcrawl/observability/__init__.py +4 -0
  75. ghostcrawl-2.1.0/ghostcrawl/observability/client.py +198 -0
  76. ghostcrawl-2.1.0/ghostcrawl/observability/raw_client.py +293 -0
  77. ghostcrawl-2.1.0/ghostcrawl/page/__init__.py +34 -0
  78. ghostcrawl-2.1.0/ghostcrawl/page/client.py +816 -0
  79. ghostcrawl-2.1.0/ghostcrawl/page/raw_client.py +1176 -0
  80. ghostcrawl-2.1.0/ghostcrawl/page/types/__init__.py +34 -0
  81. ghostcrawl-2.1.0/ghostcrawl/page/types/scroll_body_direction.py +5 -0
  82. ghostcrawl-2.1.0/ghostcrawl/params.py +38 -0
  83. ghostcrawl-2.1.0/ghostcrawl/profiles/__init__.py +4 -0
  84. ghostcrawl-2.1.0/ghostcrawl/profiles/client.py +172 -0
  85. ghostcrawl-2.1.0/ghostcrawl/profiles/raw_client.py +200 -0
  86. ghostcrawl-2.1.0/ghostcrawl/py.typed +0 -0
  87. ghostcrawl-2.1.0/ghostcrawl/raw_client.py +357 -0
  88. ghostcrawl-2.1.0/ghostcrawl/recordings/__init__.py +4 -0
  89. ghostcrawl-2.1.0/ghostcrawl/recordings/client.py +546 -0
  90. ghostcrawl-2.1.0/ghostcrawl/recordings/raw_client.py +767 -0
  91. ghostcrawl-2.1.0/ghostcrawl/retry_policy.py +71 -0
  92. ghostcrawl-2.1.0/ghostcrawl/screenshot_blobs/__init__.py +4 -0
  93. ghostcrawl-2.1.0/ghostcrawl/screenshot_blobs/client.py +125 -0
  94. ghostcrawl-2.1.0/ghostcrawl/screenshot_blobs/raw_client.py +151 -0
  95. ghostcrawl-2.1.0/ghostcrawl/script/__init__.py +4 -0
  96. ghostcrawl-2.1.0/ghostcrawl/script/client.py +124 -0
  97. ghostcrawl-2.1.0/ghostcrawl/script/raw_client.py +157 -0
  98. ghostcrawl-2.1.0/ghostcrawl/sessions/__init__.py +4 -0
  99. ghostcrawl-2.1.0/ghostcrawl/sessions/client.py +278 -0
  100. ghostcrawl-2.1.0/ghostcrawl/sessions/raw_client.py +347 -0
  101. ghostcrawl-2.1.0/ghostcrawl/storage_states/__init__.py +4 -0
  102. ghostcrawl-2.1.0/ghostcrawl/storage_states/client.py +536 -0
  103. ghostcrawl-2.1.0/ghostcrawl/storage_states/raw_client.py +810 -0
  104. ghostcrawl-2.1.0/ghostcrawl/types/__init__.py +128 -0
  105. ghostcrawl-2.1.0/ghostcrawl/types/audit_event_out.py +28 -0
  106. ghostcrawl-2.1.0/ghostcrawl/types/audit_events_response.py +14 -0
  107. ghostcrawl-2.1.0/ghostcrawl/types/cookie_dict.py +29 -0
  108. ghostcrawl-2.1.0/ghostcrawl/types/cookie_dict_same_site.py +5 -0
  109. ghostcrawl-2.1.0/ghostcrawl/types/device_auth_envelope.py +17 -0
  110. ghostcrawl-2.1.0/ghostcrawl/types/device_poll_request.py +12 -0
  111. ghostcrawl-2.1.0/ghostcrawl/types/enroll_response.py +15 -0
  112. ghostcrawl-2.1.0/ghostcrawl/types/http_validation_error.py +13 -0
  113. ghostcrawl-2.1.0/ghostcrawl/types/link_confirm_response.py +16 -0
  114. ghostcrawl-2.1.0/ghostcrawl/types/link_decline_response.py +13 -0
  115. ghostcrawl-2.1.0/ghostcrawl/types/password_reset_confirm_response.py +12 -0
  116. ghostcrawl-2.1.0/ghostcrawl/types/password_reset_request_response.py +12 -0
  117. ghostcrawl-2.1.0/ghostcrawl/types/regenerate_response.py +12 -0
  118. ghostcrawl-2.1.0/ghostcrawl/types/resend_response.py +12 -0
  119. ghostcrawl-2.1.0/ghostcrawl/types/retry_delivery_response.py +23 -0
  120. ghostcrawl-2.1.0/ghostcrawl/types/rotate_secret_response.py +32 -0
  121. ghostcrawl-2.1.0/ghostcrawl/types/signup_response.py +13 -0
  122. ghostcrawl-2.1.0/ghostcrawl/types/token_create_response.py +22 -0
  123. ghostcrawl-2.1.0/ghostcrawl/types/token_list_item.py +24 -0
  124. ghostcrawl-2.1.0/ghostcrawl/types/token_list_response.py +17 -0
  125. ghostcrawl-2.1.0/ghostcrawl/types/unlink_response.py +13 -0
  126. ghostcrawl-2.1.0/ghostcrawl/types/user_shape.py +14 -0
  127. ghostcrawl-2.1.0/ghostcrawl/types/validation_error.py +17 -0
  128. ghostcrawl-2.1.0/ghostcrawl/types/validation_error_loc_item.py +5 -0
  129. ghostcrawl-2.1.0/ghostcrawl/types/verify_response.py +12 -0
  130. ghostcrawl-2.1.0/ghostcrawl/types/webhook_create_response.py +25 -0
  131. ghostcrawl-2.1.0/ghostcrawl/types/webhook_delivery_list_response.py +19 -0
  132. ghostcrawl-2.1.0/ghostcrawl/types/webhook_delivery_public.py +32 -0
  133. ghostcrawl-2.1.0/ghostcrawl/types/webhook_list_response.py +19 -0
  134. ghostcrawl-2.1.0/ghostcrawl/types/webhook_public.py +29 -0
  135. ghostcrawl-2.1.0/ghostcrawl/types/webhooks_queue_response.py +27 -0
  136. ghostcrawl-2.1.0/ghostcrawl/webhooks/__init__.py +4 -0
  137. ghostcrawl-2.1.0/ghostcrawl/webhooks/client.py +743 -0
  138. ghostcrawl-2.1.0/ghostcrawl/webhooks/raw_client.py +966 -0
  139. ghostcrawl-2.1.0/ghostcrawl.egg-info/PKG-INFO +211 -0
  140. ghostcrawl-2.1.0/ghostcrawl.egg-info/SOURCES.txt +144 -0
  141. ghostcrawl-2.1.0/ghostcrawl.egg-info/dependency_links.txt +1 -0
  142. ghostcrawl-2.1.0/ghostcrawl.egg-info/entry_points.txt +2 -0
  143. ghostcrawl-2.1.0/ghostcrawl.egg-info/requires.txt +9 -0
  144. ghostcrawl-2.1.0/ghostcrawl.egg-info/top_level.txt +1 -0
  145. ghostcrawl-2.1.0/pyproject.toml +53 -0
  146. ghostcrawl-2.1.0/setup.cfg +4 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 GhostCrawl
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include ghostcrawl py.typed *.pyi
4
+ prune tests
5
+ prune ghostcrawl/tests
6
+ prune examples
7
+ prune _operator
8
+ recursive-exclude ghostcrawl reference.md
9
+ global-exclude __pycache__ *.pyc
@@ -0,0 +1,211 @@
1
+ Metadata-Version: 2.4
2
+ Name: ghostcrawl
3
+ Version: 2.1.0
4
+ Summary: Official Python SDK for the Ghostcrawl local orchestration API.
5
+ Author: Ghostcrawl
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/ghostcrawl/ghostcrawl
8
+ Keywords: ghostcrawl,scraping,browser,automation,agent
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: httpx>=0.28.1
21
+ Requires-Dist: pydantic>=2.13
22
+ Requires-Dist: typer>=0.12
23
+ Requires-Dist: mcp>=1.27.1
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0; extra == "dev"
26
+ Requires-Dist: respx>=0.23.1; extra == "dev"
27
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
28
+ Dynamic: license-file
29
+
30
+ # ghostcrawl — Python SDK + CLI
31
+
32
+ Typed Python client and `ghostcrawl` CLI for the GhostCrawl REST + MCP surface.
33
+ Full coverage of scrape, crawl, sessions, datasets, recordings, profiles,
34
+ webhooks, and the MCP tools.
35
+
36
+ Public engine names are `chrome`, `firefox`, and `webkit`. There are no other engine
37
+ names — `engine="auto"` lets the orchestrator pick.
38
+
39
+ ## Install
40
+
41
+ ```bash
42
+ pip install ghostcrawl
43
+ ```
44
+
45
+ Requires Python 3.10+. Runtime dependencies: `httpx>=0.28.1`, `pydantic>=2.13`,
46
+ `typer>=0.12`, `mcp>=1.27.1`.
47
+
48
+ ## Quickstart — Identity (v1.6 SaaS)
49
+
50
+ The v1.6 surface adds the `ghostcrawl init / identity` workflow for generating
51
+ authenticated, opaque identity envelopes consumed by the engine binary.
52
+
53
+ ### CLI
54
+
55
+ ```bash
56
+ # One-time setup: stores API key to ~/.config/ghostcrawl/config.toml
57
+ ghostcrawl init
58
+
59
+ # Request an identity envelope
60
+ ghostcrawl identity --os ios --browser safari --device iphone-15-pro
61
+ ```
62
+
63
+ Output is an opaque JSON envelope with an AES-256-GCM encrypted payload.
64
+ The payload is not user-decodable — it is consumed verbatim by the browser binary.
65
+
66
+ ### Python SDK
67
+
68
+ ```python
69
+ from ghostcrawl import Ghostcrawl
70
+
71
+ client = Ghostcrawl(api_key="gc_...")
72
+ envelope = client.identity(
73
+ claim_os="ios",
74
+ claim_browser="safari",
75
+ device_model="iphone-15-pro",
76
+ )
77
+
78
+ # Pass to the engine binary; do not attempt to decode ciphertext
79
+ print(envelope.payload.alg) # 'AES-256-GCM'
80
+ print(envelope.payload.key_id) # '16-char-hex-id'
81
+ ```
82
+
83
+ > **Note:** The `payload.ciphertext` field is an opaque base64 string. It is
84
+ > designed to be passed directly to the engine binary, which handles decryption
85
+ > using a server-derived key. The SDK never decodes or inspects the ciphertext.
86
+
87
+ ## Quickstart — SDK (sync)
88
+
89
+ ```python
90
+ from ghostcrawl import GhostcrawlClient
91
+
92
+ client = GhostcrawlClient(api_key="YOUR_KEY", base_url="https://api.ghostcrawl.io")
93
+
94
+ # Scrape
95
+ result = client.page.scrape(url="https://example.com", engine="chrome")
96
+ print(result)
97
+
98
+ # Start a crawl run
99
+ run = client.crawl_runs.create(
100
+ seed_url="https://example.com",
101
+ max_depth=2,
102
+ max_pages=50,
103
+ )
104
+ print(run.run_id)
105
+
106
+ # List sessions
107
+ sessions = client.sessions.list()
108
+ for s in sessions.items:
109
+ print(s.session_id, s.status)
110
+ ```
111
+
112
+ ## Quickstart — SDK (async)
113
+
114
+ ```python
115
+ import asyncio
116
+ from ghostcrawl import AsyncGhostcrawlClient
117
+
118
+ async def main():
119
+ async with AsyncGhostcrawlClient(api_key="YOUR_KEY") as client:
120
+ result = await client.page.scrape(url="https://example.com")
121
+ print(result)
122
+
123
+ asyncio.run(main())
124
+ ```
125
+
126
+ ## Quickstart — CLI
127
+
128
+ ```bash
129
+ export GHOSTCRAWL_API_KEY=your-token
130
+
131
+ # Scrape a URL (JSON to stdout)
132
+ ghostcrawl scrape https://example.com
133
+
134
+ # Start a crawl run
135
+ ghostcrawl crawl https://example.com --max-depth 2 --out crawl.json
136
+
137
+ # List sessions
138
+ ghostcrawl session list
139
+
140
+ # Auth helpers
141
+ ghostcrawl auth whoami
142
+ ghostcrawl auth login
143
+ ```
144
+
145
+ ## MCP Wrapper
146
+
147
+ Typed wrapper over the MCP streamable-HTTP transport.
148
+
149
+ ```python
150
+ import asyncio
151
+ from ghostcrawl.mcp import GhostcrawlMCPClient
152
+
153
+ async def main():
154
+ mcp = GhostcrawlMCPClient(
155
+ mcp_url="https://api.ghostcrawl.io/mcp",
156
+ api_key="YOUR_KEY",
157
+ )
158
+ await mcp.connect()
159
+
160
+ # Navigate
161
+ result = await mcp.navigate(url="https://example.com")
162
+
163
+ # Act on page
164
+ result = await mcp.act(goal="Find the contact email")
165
+
166
+ # Extract structured data
167
+ result = await mcp.extract(schema={"type": "object", "properties": {"title": {"type": "string"}}})
168
+
169
+ # Screenshot
170
+ shot = await mcp.screenshot()
171
+
172
+ # Health check
173
+ pong = await mcp.ping()
174
+
175
+ await mcp.close()
176
+
177
+ asyncio.run(main())
178
+ ```
179
+
180
+ ## Resource Coverage
181
+
182
+ | Resource | Client attribute | Endpoints covered |
183
+ |----------|-----------------|-------------------|
184
+ | Page (scrape/crawl/agent) | `client.page` | scrape, map, screenshot, pdf, search |
185
+ | Sessions | `client.sessions` | list, get, create, end, navigate, pause, resume |
186
+ | Crawl runs | `client.crawl_runs` | create, list, get, cancel |
187
+ | Datasets | `client.datasets` | list, get, create, delete, append |
188
+ | Recordings | `client.recordings` | list, get, create, delete |
189
+ | Profiles | `client.profiles` | list, get, create, delete |
190
+ | Webhooks | `client.webhooks` | list, get, create, delete, test, queue |
191
+ | Storage states | `client.storage_states` | list, get, import, export |
192
+ | Script | `client.script` | run |
193
+ | Observability | `client.observability` | metrics, health |
194
+ | Auth / tokens | `client.auth`, `client.auth_tokens` | login, refresh, token CRUD |
195
+ | Budgets | `client.budgets` | get, update |
196
+ | Audit log | `client.audit` | list events |
197
+
198
+ ## Authentication
199
+
200
+ ```python
201
+ client = GhostcrawlClient(
202
+ api_key="gc_live_...",
203
+ base_url="https://api.ghostcrawl.io", # default — override for self-hosted
204
+ )
205
+ ```
206
+
207
+ Every request sends `Authorization: Bearer <api_key>` and `X-API-Key: <api_key>`.
208
+
209
+ ## License
210
+
211
+ Apache-2.0
@@ -0,0 +1,182 @@
1
+ # ghostcrawl — Python SDK + CLI
2
+
3
+ Typed Python client and `ghostcrawl` CLI for the GhostCrawl REST + MCP surface.
4
+ Full coverage of scrape, crawl, sessions, datasets, recordings, profiles,
5
+ webhooks, and the MCP tools.
6
+
7
+ Public engine names are `chrome`, `firefox`, and `webkit`. There are no other engine
8
+ names — `engine="auto"` lets the orchestrator pick.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install ghostcrawl
14
+ ```
15
+
16
+ Requires Python 3.10+. Runtime dependencies: `httpx>=0.28.1`, `pydantic>=2.13`,
17
+ `typer>=0.12`, `mcp>=1.27.1`.
18
+
19
+ ## Quickstart — Identity (v1.6 SaaS)
20
+
21
+ The v1.6 surface adds the `ghostcrawl init / identity` workflow for generating
22
+ authenticated, opaque identity envelopes consumed by the engine binary.
23
+
24
+ ### CLI
25
+
26
+ ```bash
27
+ # One-time setup: stores API key to ~/.config/ghostcrawl/config.toml
28
+ ghostcrawl init
29
+
30
+ # Request an identity envelope
31
+ ghostcrawl identity --os ios --browser safari --device iphone-15-pro
32
+ ```
33
+
34
+ Output is an opaque JSON envelope with an AES-256-GCM encrypted payload.
35
+ The payload is not user-decodable — it is consumed verbatim by the browser binary.
36
+
37
+ ### Python SDK
38
+
39
+ ```python
40
+ from ghostcrawl import Ghostcrawl
41
+
42
+ client = Ghostcrawl(api_key="gc_...")
43
+ envelope = client.identity(
44
+ claim_os="ios",
45
+ claim_browser="safari",
46
+ device_model="iphone-15-pro",
47
+ )
48
+
49
+ # Pass to the engine binary; do not attempt to decode ciphertext
50
+ print(envelope.payload.alg) # 'AES-256-GCM'
51
+ print(envelope.payload.key_id) # '16-char-hex-id'
52
+ ```
53
+
54
+ > **Note:** The `payload.ciphertext` field is an opaque base64 string. It is
55
+ > designed to be passed directly to the engine binary, which handles decryption
56
+ > using a server-derived key. The SDK never decodes or inspects the ciphertext.
57
+
58
+ ## Quickstart — SDK (sync)
59
+
60
+ ```python
61
+ from ghostcrawl import GhostcrawlClient
62
+
63
+ client = GhostcrawlClient(api_key="YOUR_KEY", base_url="https://api.ghostcrawl.io")
64
+
65
+ # Scrape
66
+ result = client.page.scrape(url="https://example.com", engine="chrome")
67
+ print(result)
68
+
69
+ # Start a crawl run
70
+ run = client.crawl_runs.create(
71
+ seed_url="https://example.com",
72
+ max_depth=2,
73
+ max_pages=50,
74
+ )
75
+ print(run.run_id)
76
+
77
+ # List sessions
78
+ sessions = client.sessions.list()
79
+ for s in sessions.items:
80
+ print(s.session_id, s.status)
81
+ ```
82
+
83
+ ## Quickstart — SDK (async)
84
+
85
+ ```python
86
+ import asyncio
87
+ from ghostcrawl import AsyncGhostcrawlClient
88
+
89
+ async def main():
90
+ async with AsyncGhostcrawlClient(api_key="YOUR_KEY") as client:
91
+ result = await client.page.scrape(url="https://example.com")
92
+ print(result)
93
+
94
+ asyncio.run(main())
95
+ ```
96
+
97
+ ## Quickstart — CLI
98
+
99
+ ```bash
100
+ export GHOSTCRAWL_API_KEY=your-token
101
+
102
+ # Scrape a URL (JSON to stdout)
103
+ ghostcrawl scrape https://example.com
104
+
105
+ # Start a crawl run
106
+ ghostcrawl crawl https://example.com --max-depth 2 --out crawl.json
107
+
108
+ # List sessions
109
+ ghostcrawl session list
110
+
111
+ # Auth helpers
112
+ ghostcrawl auth whoami
113
+ ghostcrawl auth login
114
+ ```
115
+
116
+ ## MCP Wrapper
117
+
118
+ Typed wrapper over the MCP streamable-HTTP transport.
119
+
120
+ ```python
121
+ import asyncio
122
+ from ghostcrawl.mcp import GhostcrawlMCPClient
123
+
124
+ async def main():
125
+ mcp = GhostcrawlMCPClient(
126
+ mcp_url="https://api.ghostcrawl.io/mcp",
127
+ api_key="YOUR_KEY",
128
+ )
129
+ await mcp.connect()
130
+
131
+ # Navigate
132
+ result = await mcp.navigate(url="https://example.com")
133
+
134
+ # Act on page
135
+ result = await mcp.act(goal="Find the contact email")
136
+
137
+ # Extract structured data
138
+ result = await mcp.extract(schema={"type": "object", "properties": {"title": {"type": "string"}}})
139
+
140
+ # Screenshot
141
+ shot = await mcp.screenshot()
142
+
143
+ # Health check
144
+ pong = await mcp.ping()
145
+
146
+ await mcp.close()
147
+
148
+ asyncio.run(main())
149
+ ```
150
+
151
+ ## Resource Coverage
152
+
153
+ | Resource | Client attribute | Endpoints covered |
154
+ |----------|-----------------|-------------------|
155
+ | Page (scrape/crawl/agent) | `client.page` | scrape, map, screenshot, pdf, search |
156
+ | Sessions | `client.sessions` | list, get, create, end, navigate, pause, resume |
157
+ | Crawl runs | `client.crawl_runs` | create, list, get, cancel |
158
+ | Datasets | `client.datasets` | list, get, create, delete, append |
159
+ | Recordings | `client.recordings` | list, get, create, delete |
160
+ | Profiles | `client.profiles` | list, get, create, delete |
161
+ | Webhooks | `client.webhooks` | list, get, create, delete, test, queue |
162
+ | Storage states | `client.storage_states` | list, get, import, export |
163
+ | Script | `client.script` | run |
164
+ | Observability | `client.observability` | metrics, health |
165
+ | Auth / tokens | `client.auth`, `client.auth_tokens` | login, refresh, token CRUD |
166
+ | Budgets | `client.budgets` | get, update |
167
+ | Audit log | `client.audit` | list events |
168
+
169
+ ## Authentication
170
+
171
+ ```python
172
+ client = GhostcrawlClient(
173
+ api_key="gc_live_...",
174
+ base_url="https://api.ghostcrawl.io", # default — override for self-hosted
175
+ )
176
+ ```
177
+
178
+ Every request sends `Authorization: Bearer <api_key>` and `X-API-Key: <api_key>`.
179
+
180
+ ## License
181
+
182
+ Apache-2.0