deepsieve 0.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 (125) hide show
  1. deepsieve-0.1.0/PKG-INFO +559 -0
  2. deepsieve-0.1.0/README.md +547 -0
  3. deepsieve-0.1.0/pyproject.toml +53 -0
  4. deepsieve-0.1.0/setup.cfg +4 -0
  5. deepsieve-0.1.0/src/deepsieve/__init__.py +17 -0
  6. deepsieve-0.1.0/src/deepsieve/_hooks/__init__.py +4 -0
  7. deepsieve-0.1.0/src/deepsieve/_hooks/sdkhooks.py +74 -0
  8. deepsieve-0.1.0/src/deepsieve/_hooks/types.py +124 -0
  9. deepsieve-0.1.0/src/deepsieve/_version.py +15 -0
  10. deepsieve-0.1.0/src/deepsieve/basesdk.py +392 -0
  11. deepsieve-0.1.0/src/deepsieve/errors/__init__.py +39 -0
  12. deepsieve-0.1.0/src/deepsieve/errors/no_response_error.py +17 -0
  13. deepsieve-0.1.0/src/deepsieve/errors/responsevalidationerror.py +27 -0
  14. deepsieve-0.1.0/src/deepsieve/errors/sdkdefaulterror.py +40 -0
  15. deepsieve-0.1.0/src/deepsieve/errors/sdkerror.py +30 -0
  16. deepsieve-0.1.0/src/deepsieve/errors/v1error.py +35 -0
  17. deepsieve-0.1.0/src/deepsieve/httpclient.py +125 -0
  18. deepsieve-0.1.0/src/deepsieve/models/__init__.py +841 -0
  19. deepsieve-0.1.0/src/deepsieve/models/adjustdraftrequest.py +15 -0
  20. deepsieve-0.1.0/src/deepsieve/models/answerfollowuprequest.py +18 -0
  21. deepsieve-0.1.0/src/deepsieve/models/apikey.py +142 -0
  22. deepsieve-0.1.0/src/deepsieve/models/apikeywithsecret.py +147 -0
  23. deepsieve-0.1.0/src/deepsieve/models/blueprintmeta.py +49 -0
  24. deepsieve-0.1.0/src/deepsieve/models/blueprintonboardingsession.py +107 -0
  25. deepsieve-0.1.0/src/deepsieve/models/blueprintonboardingsessionack.py +44 -0
  26. deepsieve-0.1.0/src/deepsieve/models/citation.py +65 -0
  27. deepsieve-0.1.0/src/deepsieve/models/createkeyrequest.py +109 -0
  28. deepsieve-0.1.0/src/deepsieve/models/createrunrequest.py +96 -0
  29. deepsieve-0.1.0/src/deepsieve/models/createwebhookrequest.py +22 -0
  30. deepsieve-0.1.0/src/deepsieve/models/datacatalog.py +27 -0
  31. deepsieve-0.1.0/src/deepsieve/models/deletedreport.py +35 -0
  32. deepsieve-0.1.0/src/deepsieve/models/disabledwebhookendpoint.py +26 -0
  33. deepsieve-0.1.0/src/deepsieve/models/entitydescriptor.py +51 -0
  34. deepsieve-0.1.0/src/deepsieve/models/entitypage.py +84 -0
  35. deepsieve-0.1.0/src/deepsieve/models/entityrow.py +70 -0
  36. deepsieve-0.1.0/src/deepsieve/models/exportjson.py +96 -0
  37. deepsieve-0.1.0/src/deepsieve/models/identity.py +96 -0
  38. deepsieve-0.1.0/src/deepsieve/models/onboardingstatus.py +23 -0
  39. deepsieve-0.1.0/src/deepsieve/models/reportcolumn.py +43 -0
  40. deepsieve-0.1.0/src/deepsieve/models/reportcolumnscatalog.py +50 -0
  41. deepsieve-0.1.0/src/deepsieve/models/reportconfig.py +32 -0
  42. deepsieve-0.1.0/src/deepsieve/models/reportsummary.py +57 -0
  43. deepsieve-0.1.0/src/deepsieve/models/reporttab.py +53 -0
  44. deepsieve-0.1.0/src/deepsieve/models/reporttabdata.py +121 -0
  45. deepsieve-0.1.0/src/deepsieve/models/reportupsert.py +39 -0
  46. deepsieve-0.1.0/src/deepsieve/models/researchrun.py +291 -0
  47. deepsieve-0.1.0/src/deepsieve/models/revokedkey.py +26 -0
  48. deepsieve-0.1.0/src/deepsieve/models/runstatus.py +24 -0
  49. deepsieve-0.1.0/src/deepsieve/models/savedreport.py +45 -0
  50. deepsieve-0.1.0/src/deepsieve/models/security.py +24 -0
  51. deepsieve-0.1.0/src/deepsieve/models/startonboardingrequest.py +15 -0
  52. deepsieve-0.1.0/src/deepsieve/models/updatewebhookrequest.py +48 -0
  53. deepsieve-0.1.0/src/deepsieve/models/v1_blueprints_adjust_onboardingop.py +39 -0
  54. deepsieve-0.1.0/src/deepsieve/models/v1_blueprints_answer_onboardingop.py +39 -0
  55. deepsieve-0.1.0/src/deepsieve/models/v1_blueprints_approve_onboardingop.py +32 -0
  56. deepsieve-0.1.0/src/deepsieve/models/v1_blueprints_get_onboardingop.py +32 -0
  57. deepsieve-0.1.0/src/deepsieve/models/v1_blueprints_start_onboardingop.py +72 -0
  58. deepsieve-0.1.0/src/deepsieve/models/v1_data_data_catalogop.py +18 -0
  59. deepsieve-0.1.0/src/deepsieve/models/v1_data_export_datasetop.py +82 -0
  60. deepsieve-0.1.0/src/deepsieve/models/v1_data_read_entity_dataop.py +99 -0
  61. deepsieve-0.1.0/src/deepsieve/models/v1_keys_create_keyop.py +18 -0
  62. deepsieve-0.1.0/src/deepsieve/models/v1_keys_list_keysop.py +107 -0
  63. deepsieve-0.1.0/src/deepsieve/models/v1_keys_revoke_keyop.py +29 -0
  64. deepsieve-0.1.0/src/deepsieve/models/v1_keys_rotate_keyop.py +175 -0
  65. deepsieve-0.1.0/src/deepsieve/models/v1_meta_get_meop.py +18 -0
  66. deepsieve-0.1.0/src/deepsieve/models/v1_reports_create_report_v1op.py +18 -0
  67. deepsieve-0.1.0/src/deepsieve/models/v1_reports_delete_report_v1op.py +29 -0
  68. deepsieve-0.1.0/src/deepsieve/models/v1_reports_get_report_v1op.py +29 -0
  69. deepsieve-0.1.0/src/deepsieve/models/v1_reports_list_reports_v1op.py +61 -0
  70. deepsieve-0.1.0/src/deepsieve/models/v1_reports_report_columns_v1op.py +18 -0
  71. deepsieve-0.1.0/src/deepsieve/models/v1_reports_report_tab_data_v1op.py +36 -0
  72. deepsieve-0.1.0/src/deepsieve/models/v1_reports_update_report_v1op.py +36 -0
  73. deepsieve-0.1.0/src/deepsieve/models/v1_research_cancel_runop.py +343 -0
  74. deepsieve-0.1.0/src/deepsieve/models/v1_research_create_runop.py +66 -0
  75. deepsieve-0.1.0/src/deepsieve/models/v1_research_get_runop.py +29 -0
  76. deepsieve-0.1.0/src/deepsieve/models/v1_research_list_runsop.py +116 -0
  77. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_create_webhookop.py +21 -0
  78. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_disable_webhookop.py +32 -0
  79. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_get_webhookop.py +29 -0
  80. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_list_webhooksop.py +107 -0
  81. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_ping_webhookop.py +29 -0
  82. deepsieve-0.1.0/src/deepsieve/models/v1_webhooks_update_webhookop.py +36 -0
  83. deepsieve-0.1.0/src/deepsieve/models/v1error.py +102 -0
  84. deepsieve-0.1.0/src/deepsieve/models/v1errorcode.py +36 -0
  85. deepsieve-0.1.0/src/deepsieve/models/v1scope.py +31 -0
  86. deepsieve-0.1.0/src/deepsieve/models/webhookdeliveryqueued.py +28 -0
  87. deepsieve-0.1.0/src/deepsieve/models/webhookendpoint.py +76 -0
  88. deepsieve-0.1.0/src/deepsieve/models/webhookendpointwithsecret.py +87 -0
  89. deepsieve-0.1.0/src/deepsieve/models/webhookeventtype.py +21 -0
  90. deepsieve-0.1.0/src/deepsieve/py.typed +1 -0
  91. deepsieve-0.1.0/src/deepsieve/sdk.py +211 -0
  92. deepsieve-0.1.0/src/deepsieve/sdkconfiguration.py +49 -0
  93. deepsieve-0.1.0/src/deepsieve/types/__init__.py +24 -0
  94. deepsieve-0.1.0/src/deepsieve/types/base64fileinput.py +43 -0
  95. deepsieve-0.1.0/src/deepsieve/types/basemodel.py +77 -0
  96. deepsieve-0.1.0/src/deepsieve/utils/__init__.py +177 -0
  97. deepsieve-0.1.0/src/deepsieve/utils/annotations.py +79 -0
  98. deepsieve-0.1.0/src/deepsieve/utils/datetimes.py +37 -0
  99. deepsieve-0.1.0/src/deepsieve/utils/dynamic_imports.py +54 -0
  100. deepsieve-0.1.0/src/deepsieve/utils/enums.py +134 -0
  101. deepsieve-0.1.0/src/deepsieve/utils/eventstreaming.py +326 -0
  102. deepsieve-0.1.0/src/deepsieve/utils/forms.py +239 -0
  103. deepsieve-0.1.0/src/deepsieve/utils/headers.py +136 -0
  104. deepsieve-0.1.0/src/deepsieve/utils/logger.py +22 -0
  105. deepsieve-0.1.0/src/deepsieve/utils/metadata.py +119 -0
  106. deepsieve-0.1.0/src/deepsieve/utils/queryparams.py +217 -0
  107. deepsieve-0.1.0/src/deepsieve/utils/requestbodies.py +67 -0
  108. deepsieve-0.1.0/src/deepsieve/utils/retries.py +356 -0
  109. deepsieve-0.1.0/src/deepsieve/utils/security.py +198 -0
  110. deepsieve-0.1.0/src/deepsieve/utils/serializers.py +306 -0
  111. deepsieve-0.1.0/src/deepsieve/utils/unmarshal_json_response.py +38 -0
  112. deepsieve-0.1.0/src/deepsieve/utils/url.py +155 -0
  113. deepsieve-0.1.0/src/deepsieve/utils/values.py +137 -0
  114. deepsieve-0.1.0/src/deepsieve/v1_blueprints.py +1178 -0
  115. deepsieve-0.1.0/src/deepsieve/v1_data.py +736 -0
  116. deepsieve-0.1.0/src/deepsieve/v1_keys.py +925 -0
  117. deepsieve-0.1.0/src/deepsieve/v1_meta.py +206 -0
  118. deepsieve-0.1.0/src/deepsieve/v1_reports.py +1488 -0
  119. deepsieve-0.1.0/src/deepsieve/v1_research.py +976 -0
  120. deepsieve-0.1.0/src/deepsieve/v1_webhooks.py +1328 -0
  121. deepsieve-0.1.0/src/deepsieve.egg-info/PKG-INFO +559 -0
  122. deepsieve-0.1.0/src/deepsieve.egg-info/SOURCES.txt +123 -0
  123. deepsieve-0.1.0/src/deepsieve.egg-info/dependency_links.txt +1 -0
  124. deepsieve-0.1.0/src/deepsieve.egg-info/requires.txt +3 -0
  125. deepsieve-0.1.0/src/deepsieve.egg-info/top_level.txt +1 -0
@@ -0,0 +1,559 @@
1
+ Metadata-Version: 2.4
2
+ Name: deepsieve
3
+ Version: 0.1.0
4
+ Summary: Python Client SDK Generated by Speakeasy.
5
+ Author: Speakeasy
6
+ License: Apache-2.0
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: httpcore>=1.0.9
10
+ Requires-Dist: httpx>=0.28.1
11
+ Requires-Dist: pydantic>=2.11.2
12
+
13
+ # openapi
14
+
15
+ Developer-friendly & type-safe Python SDK specifically catered to leverage *openapi* API.
16
+
17
+ [![Built by Speakeasy](https://img.shields.io/badge/Built_by-SPEAKEASY-374151?style=for-the-badge&labelColor=f3f4f6)](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=python)
18
+ [![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://opensource.org/licenses/MIT)
19
+
20
+
21
+ <br /><br />
22
+ > [!IMPORTANT]
23
+ > This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/honey-nudger-inc/deepsieve). Delete this section before > publishing to a package manager.
24
+
25
+ <!-- Start Summary [summary] -->
26
+ ## Summary
27
+
28
+ DeepSieve API: The agent-facing DeepSieve /v1 API — cited deep-research runs, dataset sync, reports, webhooks, keys.
29
+ <!-- End Summary [summary] -->
30
+
31
+ <!-- Start Table of Contents [toc] -->
32
+ ## Table of Contents
33
+ <!-- $toc-max-depth=2 -->
34
+ * [openapi](#openapi)
35
+ * [SDK Installation](#sdk-installation)
36
+ * [IDE Support](#ide-support)
37
+ * [SDK Example Usage](#sdk-example-usage)
38
+ * [Authentication](#authentication)
39
+ * [Available Resources and Operations](#available-resources-and-operations)
40
+ * [Retries](#retries)
41
+ * [Error Handling](#error-handling)
42
+ * [Server Selection](#server-selection)
43
+ * [Custom HTTP Client](#custom-http-client)
44
+ * [Resource Management](#resource-management)
45
+ * [Debugging](#debugging)
46
+ * [Development](#development)
47
+ * [Maturity](#maturity)
48
+ * [Contributions](#contributions)
49
+
50
+ <!-- End Table of Contents [toc] -->
51
+
52
+ <!-- Start SDK Installation [installation] -->
53
+ ## SDK Installation
54
+
55
+ > [!TIP]
56
+ > To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
57
+
58
+
59
+ > [!NOTE]
60
+ > **Python version upgrade policy**
61
+ >
62
+ > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
63
+
64
+ The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
65
+
66
+ ### uv
67
+
68
+ *uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
69
+
70
+ ```bash
71
+ uv add git+<UNSET>.git
72
+ ```
73
+
74
+ ### PIP
75
+
76
+ *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
77
+
78
+ ```bash
79
+ pip install git+<UNSET>.git
80
+ ```
81
+
82
+ ### Poetry
83
+
84
+ *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
85
+
86
+ ```bash
87
+ poetry add git+<UNSET>.git
88
+ ```
89
+
90
+ ### Shell and script usage with `uv`
91
+
92
+ You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
93
+
94
+ ```shell
95
+ uvx --from deepsieve python
96
+ ```
97
+
98
+ It's also possible to write a standalone Python script without needing to set up a whole project like so:
99
+
100
+ ```python
101
+ #!/usr/bin/env -S uv run --script
102
+ # /// script
103
+ # requires-python = ">=3.10"
104
+ # dependencies = [
105
+ # "deepsieve",
106
+ # ]
107
+ # ///
108
+
109
+ from deepsieve import SDK
110
+
111
+ sdk = SDK(
112
+ # SDK arguments
113
+ )
114
+
115
+ # Rest of script here...
116
+ ```
117
+
118
+ Once that is saved to a file, you can run it with `uv run script.py` where
119
+ `script.py` can be replaced with the actual file name.
120
+ <!-- End SDK Installation [installation] -->
121
+
122
+ <!-- Start IDE Support [idesupport] -->
123
+ ## IDE Support
124
+
125
+ ### PyCharm
126
+
127
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
128
+
129
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
130
+ <!-- End IDE Support [idesupport] -->
131
+
132
+ <!-- Start SDK Example Usage [usage] -->
133
+ ## SDK Example Usage
134
+
135
+ ### Example
136
+
137
+ ```python
138
+ # Synchronous Example
139
+ from deepsieve import SDK
140
+
141
+
142
+ with SDK(
143
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
144
+ ) as sdk:
145
+
146
+ res = sdk.v1_meta.v1_meta_get_me()
147
+
148
+ # Handle response
149
+ print(res)
150
+ ```
151
+
152
+ </br>
153
+
154
+ The same SDK client can also be used to make asynchronous requests by importing asyncio.
155
+
156
+ ```python
157
+ # Asynchronous Example
158
+ import asyncio
159
+ from deepsieve import SDK
160
+
161
+ async def main():
162
+
163
+ async with SDK(
164
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
165
+ ) as sdk:
166
+
167
+ res = await sdk.v1_meta.v1_meta_get_me_async()
168
+
169
+ # Handle response
170
+ print(res)
171
+
172
+ asyncio.run(main())
173
+ ```
174
+ <!-- End SDK Example Usage [usage] -->
175
+
176
+ <!-- Start Authentication [security] -->
177
+ ## Authentication
178
+
179
+ ### Per-Client Security Schemes
180
+
181
+ This SDK supports the following security scheme globally:
182
+
183
+ | Name | Type | Scheme |
184
+ | ------------- | ---- | ----------- |
185
+ | `bearer_auth` | http | HTTP Bearer |
186
+
187
+ To authenticate with the API the `bearer_auth` parameter must be set when initializing the SDK client instance. For example:
188
+ ```python
189
+ from deepsieve import SDK
190
+
191
+
192
+ with SDK(
193
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
194
+ ) as sdk:
195
+
196
+ res = sdk.v1_meta.v1_meta_get_me()
197
+
198
+ # Handle response
199
+ print(res)
200
+
201
+ ```
202
+ <!-- End Authentication [security] -->
203
+
204
+ <!-- Start Available Resources and Operations [operations] -->
205
+ ## Available Resources and Operations
206
+
207
+ <details open>
208
+ <summary>Available methods</summary>
209
+
210
+ ### [V1Blueprints](docs/sdks/v1blueprints/README.md)
211
+
212
+ * [v1_blueprints_start_onboarding](docs/sdks/v1blueprints/README.md#v1_blueprints_start_onboarding) - Start Blueprint onboarding from a natural-language prompt (202)
213
+ * [v1_blueprints_get_onboarding](docs/sdks/v1blueprints/README.md#v1_blueprints_get_onboarding) - Poll an onboarding session (draft + follow-ups)
214
+ * [v1_blueprints_answer_onboarding](docs/sdks/v1blueprints/README.md#v1_blueprints_answer_onboarding) - Answer one follow-up question
215
+ * [v1_blueprints_adjust_onboarding](docs/sdks/v1blueprints/README.md#v1_blueprints_adjust_onboarding) - Adjust the draft in natural language (202)
216
+ * [v1_blueprints_approve_onboarding](docs/sdks/v1blueprints/README.md#v1_blueprints_approve_onboarding) - Approve the draft and instantiate it (202)
217
+
218
+ ### [V1Data](docs/sdks/v1data/README.md)
219
+
220
+ * [v1_data_data_catalog](docs/sdks/v1data/README.md#v1_data_data_catalog) - Discover the active Blueprint's entity catalog
221
+ * [v1_data_read_entity_data](docs/sdks/v1data/README.md#v1_data_read_entity_data) - Read (and incrementally sync) an entity's rows
222
+ * [v1_data_export_dataset](docs/sdks/v1data/README.md#v1_data_export_dataset) - Export the whole dataset (NDJSON / JSON / CSV)
223
+
224
+ ### [V1Keys](docs/sdks/v1keys/README.md)
225
+
226
+ * [v1_keys_create_key](docs/sdks/v1keys/README.md#v1_keys_create_key) - Mint an API key (secret revealed once)
227
+ * [v1_keys_list_keys](docs/sdks/v1keys/README.md#v1_keys_list_keys) - List API keys (metadata only)
228
+ * [v1_keys_revoke_key](docs/sdks/v1keys/README.md#v1_keys_revoke_key) - Revoke an API key immediately
229
+ * [v1_keys_rotate_key](docs/sdks/v1keys/README.md#v1_keys_rotate_key) - Rotate an API key (24h grace window)
230
+
231
+ ### [V1Meta](docs/sdks/v1meta/README.md)
232
+
233
+ * [v1_meta_get_me](docs/sdks/v1meta/README.md#v1_meta_get_me) - Who am I? (key verification)
234
+
235
+ ### [V1Reports](docs/sdks/v1reports/README.md)
236
+
237
+ * [v1_reports_list_reports_v1](docs/sdks/v1reports/README.md#v1_reports_list_reports_v1) - List saved reports
238
+ * [v1_reports_create_report_v1](docs/sdks/v1reports/README.md#v1_reports_create_report_v1) - Create a saved report
239
+ * [v1_reports_report_columns_v1](docs/sdks/v1reports/README.md#v1_reports_report_columns_v1) - The selectable report-column vocabulary per entity
240
+ * [v1_reports_get_report_v1](docs/sdks/v1reports/README.md#v1_reports_get_report_v1) - Fetch one saved report
241
+ * [v1_reports_update_report_v1](docs/sdks/v1reports/README.md#v1_reports_update_report_v1) - Update a saved report's name or config
242
+ * [v1_reports_delete_report_v1](docs/sdks/v1reports/README.md#v1_reports_delete_report_v1) - Delete a saved report
243
+ * [v1_reports_report_tab_data_v1](docs/sdks/v1reports/README.md#v1_reports_report_tab_data_v1) - Read a report tab's cross-run rows
244
+
245
+ ### [V1Research](docs/sdks/v1research/README.md)
246
+
247
+ * [v1_research_create_run](docs/sdks/v1research/README.md#v1_research_create_run) - Start a research run (async, 202)
248
+ * [v1_research_list_runs](docs/sdks/v1research/README.md#v1_research_list_runs) - List research runs
249
+ * [v1_research_get_run](docs/sdks/v1research/README.md#v1_research_get_run) - Poll one research run
250
+ * [v1_research_cancel_run](docs/sdks/v1research/README.md#v1_research_cancel_run) - Request cancellation of a run
251
+
252
+ ### [V1Webhooks](docs/sdks/v1webhooks/README.md)
253
+
254
+ * [v1_webhooks_create_webhook](docs/sdks/v1webhooks/README.md#v1_webhooks_create_webhook) - Register a webhook endpoint (secret revealed once)
255
+ * [v1_webhooks_list_webhooks](docs/sdks/v1webhooks/README.md#v1_webhooks_list_webhooks) - List webhook endpoints
256
+ * [v1_webhooks_get_webhook](docs/sdks/v1webhooks/README.md#v1_webhooks_get_webhook) - Fetch one webhook endpoint
257
+ * [v1_webhooks_update_webhook](docs/sdks/v1webhooks/README.md#v1_webhooks_update_webhook) - Update a webhook endpoint's URL or events
258
+ * [v1_webhooks_disable_webhook](docs/sdks/v1webhooks/README.md#v1_webhooks_disable_webhook) - Disable a webhook endpoint
259
+ * [v1_webhooks_ping_webhook](docs/sdks/v1webhooks/README.md#v1_webhooks_ping_webhook) - Queue a test `ping` delivery
260
+
261
+ </details>
262
+ <!-- End Available Resources and Operations [operations] -->
263
+
264
+ <!-- Start Retries [retries] -->
265
+ ## Retries
266
+
267
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
268
+
269
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
270
+ ```python
271
+ from deepsieve import SDK
272
+ from deepsieve.utils import BackoffStrategy, RetryConfig
273
+
274
+
275
+ with SDK(
276
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
277
+ ) as sdk:
278
+
279
+ res = sdk.v1_meta.v1_meta_get_me(,
280
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
281
+
282
+ # Handle response
283
+ print(res)
284
+
285
+ ```
286
+
287
+ If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
288
+ ```python
289
+ from deepsieve import SDK
290
+ from deepsieve.utils import BackoffStrategy, RetryConfig
291
+
292
+
293
+ with SDK(
294
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
295
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
296
+ ) as sdk:
297
+
298
+ res = sdk.v1_meta.v1_meta_get_me()
299
+
300
+ # Handle response
301
+ print(res)
302
+
303
+ ```
304
+ <!-- End Retries [retries] -->
305
+
306
+ <!-- Start Error Handling [errors] -->
307
+ ## Error Handling
308
+
309
+ [`SDKError`](./src/deepsieve/errors/sdkerror.py) is the base class for all HTTP error responses. It has the following properties:
310
+
311
+ | Property | Type | Description |
312
+ | ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
313
+ | `err.message` | `str` | Error message |
314
+ | `err.status_code` | `int` | HTTP response status code eg `404` |
315
+ | `err.headers` | `httpx.Headers` | HTTP response headers |
316
+ | `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
317
+ | `err.raw_response` | `httpx.Response` | Raw HTTP response |
318
+ | `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
319
+
320
+ ### Example
321
+ ```python
322
+ from deepsieve import SDK, errors
323
+
324
+
325
+ with SDK(
326
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
327
+ ) as sdk:
328
+ res = None
329
+ try:
330
+
331
+ res = sdk.v1_meta.v1_meta_get_me()
332
+
333
+ # Handle response
334
+ print(res)
335
+
336
+
337
+ except errors.SDKError as e:
338
+ # The base class for HTTP error responses
339
+ print(e.message)
340
+ print(e.status_code)
341
+ print(e.body)
342
+ print(e.headers)
343
+ print(e.raw_response)
344
+
345
+ # Depending on the method different errors may be thrown
346
+ if isinstance(e, errors.V1Error):
347
+ print(e.data.error) # models.V1ErrorError
348
+ ```
349
+
350
+ ### Error Classes
351
+ **Primary errors:**
352
+ * [`SDKError`](./src/deepsieve/errors/sdkerror.py): The base class for HTTP error responses.
353
+ * [`V1Error`](./src/deepsieve/errors/v1error.py): The single error envelope for every `/v1` response (and every unhandled 500 on any path). `retriable` is the load-bearing field — "should I try again?" is the one question an agent needs answered.
354
+
355
+ <details><summary>Less common errors (5)</summary>
356
+
357
+ <br />
358
+
359
+ **Network errors:**
360
+ * [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
361
+ * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
362
+ * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
363
+
364
+
365
+ **Inherit from [`SDKError`](./src/deepsieve/errors/sdkerror.py)**:
366
+ * [`ResponseValidationError`](./src/deepsieve/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
367
+
368
+ </details>
369
+ <!-- End Error Handling [errors] -->
370
+
371
+ <!-- Start Server Selection [server] -->
372
+ ## Server Selection
373
+
374
+ ### Server Variables
375
+
376
+ The default server `https://{deployment}` contains variables and is set to `https://your-deployment.example.com` by default. To override default values, the following parameters are available when initializing the SDK client instance:
377
+
378
+ | Variable | Parameter | Default | Description |
379
+ | ------------ | ----------------- | ------------------------------- | ------------------------------ |
380
+ | `deployment` | `deployment: str` | `"your-deployment.example.com"` | Your DeepSieve deployment host |
381
+
382
+ #### Example
383
+
384
+ ```python
385
+ from deepsieve import SDK
386
+
387
+
388
+ with SDK(
389
+ server_idx=0,
390
+ deployment="your-deployment.example.com",
391
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
392
+ ) as sdk:
393
+
394
+ res = sdk.v1_meta.v1_meta_get_me()
395
+
396
+ # Handle response
397
+ print(res)
398
+
399
+ ```
400
+
401
+ ### Override Server URL Per-Client
402
+
403
+ The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
404
+ ```python
405
+ from deepsieve import SDK
406
+
407
+
408
+ with SDK(
409
+ server_url="https://your-deployment.example.com",
410
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
411
+ ) as sdk:
412
+
413
+ res = sdk.v1_meta.v1_meta_get_me()
414
+
415
+ # Handle response
416
+ print(res)
417
+
418
+ ```
419
+ <!-- End Server Selection [server] -->
420
+
421
+ <!-- Start Custom HTTP Client [http-client] -->
422
+ ## Custom HTTP Client
423
+
424
+ The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
425
+ Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
426
+ This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
427
+
428
+ For example, you could specify a header for every request that this sdk makes as follows:
429
+ ```python
430
+ from deepsieve import SDK
431
+ import httpx
432
+
433
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
434
+ s = SDK(client=http_client)
435
+ ```
436
+
437
+ or you could wrap the client with your own custom logic:
438
+ ```python
439
+ from deepsieve import SDK
440
+ from deepsieve.httpclient import AsyncHttpClient
441
+ import httpx
442
+
443
+ class CustomClient(AsyncHttpClient):
444
+ client: AsyncHttpClient
445
+
446
+ def __init__(self, client: AsyncHttpClient):
447
+ self.client = client
448
+
449
+ async def send(
450
+ self,
451
+ request: httpx.Request,
452
+ *,
453
+ stream: bool = False,
454
+ auth: Union[
455
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
456
+ ] = httpx.USE_CLIENT_DEFAULT,
457
+ follow_redirects: Union[
458
+ bool, httpx._client.UseClientDefault
459
+ ] = httpx.USE_CLIENT_DEFAULT,
460
+ ) -> httpx.Response:
461
+ request.headers["Client-Level-Header"] = "added by client"
462
+
463
+ return await self.client.send(
464
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
465
+ )
466
+
467
+ def build_request(
468
+ self,
469
+ method: str,
470
+ url: httpx._types.URLTypes,
471
+ *,
472
+ content: Optional[httpx._types.RequestContent] = None,
473
+ data: Optional[httpx._types.RequestData] = None,
474
+ files: Optional[httpx._types.RequestFiles] = None,
475
+ json: Optional[Any] = None,
476
+ params: Optional[httpx._types.QueryParamTypes] = None,
477
+ headers: Optional[httpx._types.HeaderTypes] = None,
478
+ cookies: Optional[httpx._types.CookieTypes] = None,
479
+ timeout: Union[
480
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
481
+ ] = httpx.USE_CLIENT_DEFAULT,
482
+ extensions: Optional[httpx._types.RequestExtensions] = None,
483
+ ) -> httpx.Request:
484
+ return self.client.build_request(
485
+ method,
486
+ url,
487
+ content=content,
488
+ data=data,
489
+ files=files,
490
+ json=json,
491
+ params=params,
492
+ headers=headers,
493
+ cookies=cookies,
494
+ timeout=timeout,
495
+ extensions=extensions,
496
+ )
497
+
498
+ s = SDK(async_client=CustomClient(httpx.AsyncClient()))
499
+ ```
500
+ <!-- End Custom HTTP Client [http-client] -->
501
+
502
+ <!-- Start Resource Management [resource-management] -->
503
+ ## Resource Management
504
+
505
+ The `SDK` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
506
+
507
+ [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
508
+
509
+ ```python
510
+ from deepsieve import SDK
511
+ def main():
512
+
513
+ with SDK(
514
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
515
+ ) as sdk:
516
+ # Rest of application here...
517
+
518
+
519
+ # Or when using async:
520
+ async def amain():
521
+
522
+ async with SDK(
523
+ bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
524
+ ) as sdk:
525
+ # Rest of application here...
526
+ ```
527
+ <!-- End Resource Management [resource-management] -->
528
+
529
+ <!-- Start Debugging [debug] -->
530
+ ## Debugging
531
+
532
+ You can setup your SDK to emit debug logs for SDK requests and responses.
533
+
534
+ You can pass your own logger class directly into your SDK.
535
+ ```python
536
+ from deepsieve import SDK
537
+ import logging
538
+
539
+ logging.basicConfig(level=logging.DEBUG)
540
+ s = SDK(debug_logger=logging.getLogger("deepsieve"))
541
+ ```
542
+ <!-- End Debugging [debug] -->
543
+
544
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
545
+
546
+ # Development
547
+
548
+ ## Maturity
549
+
550
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
551
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
552
+ looking for the latest version.
553
+
554
+ ## Contributions
555
+
556
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
557
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
558
+
559
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=openapi&utm_campaign=python)