pulse-python-sdk 0.0.53__tar.gz → 0.0.54__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.
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/PKG-INFO +3 -7
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/README.md +2 -6
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/pyproject.toml +1 -1
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/client.py +77 -60
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/client_wrapper.py +2 -2
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/raw_client.py +101 -109
- pulse_python_sdk-0.0.54/src/pulse/types/extract_async_request_experimental_schema.py +5 -0
- pulse_python_sdk-0.0.53/src/pulse/types/extract_json_input_schema.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_async_request_schema.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_multipart_input_storage.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_async_request_storage.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_multipart_input_structured_output.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_async_request_structured_output.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_multipart_input.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_input.py +12 -12
- pulse_python_sdk-0.0.54/src/pulse/types/extract_input_experimental_schema.py +5 -0
- pulse_python_sdk-0.0.53/src/pulse/types/extract_async_input.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_input_schema.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_json_input_storage.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_input_storage.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_json_input_structured_output.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_input_structured_output.py +1 -1
- pulse_python_sdk-0.0.54/src/pulse/types/extract_request_experimental_schema.py +5 -0
- pulse_python_sdk-0.0.53/src/pulse/types/extract_input.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_request_schema.py +1 -1
- pulse_python_sdk-0.0.54/src/pulse/types/extract_request_storage.py +36 -0
- pulse_python_sdk-0.0.54/src/pulse/types/extract_request_structured_output.py +38 -0
- pulse_python_sdk-0.0.53/src/pulse/types/multipart_source.py → pulse_python_sdk-0.0.54/src/pulse/types/extract_source.py +1 -1
- pulse_python_sdk-0.0.53/src/pulse/types/extract_json_input.py +0 -116
- pulse_python_sdk-0.0.53/src/pulse/types/extract_json_input_experimental_schema.py +0 -5
- pulse_python_sdk-0.0.53/src/pulse/types/extract_multipart_input_experimental_schema.py +0 -5
- pulse_python_sdk-0.0.53/src/pulse/types/extract_multipart_input_schema.py +0 -5
- pulse_python_sdk-0.0.53/src/pulse/types/json_source.py +0 -29
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/api_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/datetime_utils.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/file.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/force_multipart.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_client.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_response.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_sse/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_sse/_api.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_sse/_decoders.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_sse/_exceptions.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/http_sse/_models.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/jsonable_encoder.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/pydantic_utilities.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/query_encoder.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/remove_none_from_dict.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/request_options.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/serialization.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/core/unchecked_base_model.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/environment.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/bad_request_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/forbidden_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/internal_server_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/not_found_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/too_many_requests_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/errors/unauthorized_error.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/jobs/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/jobs/client.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/jobs/raw_client.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/py.typed +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_async_response.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_async_submission_response_status.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_options.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_options_experimental_schema.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_options_schema.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_options_storage.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_options_structured_output.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/extract_response.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/job_cancellation_response.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/job_status.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/types/job_status_response.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/version.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/webhooks/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/webhooks/client.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/webhooks/raw_client.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/webhooks/types/__init__.py +0 -0
- {pulse_python_sdk-0.0.53 → pulse_python_sdk-0.0.54}/src/pulse/webhooks/types/create_webhook_link_response.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pulse-python-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.54
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -66,9 +66,7 @@ from pulse import Pulse
|
|
|
66
66
|
client = Pulse(
|
|
67
67
|
api_key="YOUR_API_KEY",
|
|
68
68
|
)
|
|
69
|
-
client.extract(
|
|
70
|
-
file_url="fileUrl",
|
|
71
|
-
)
|
|
69
|
+
client.extract()
|
|
72
70
|
```
|
|
73
71
|
|
|
74
72
|
## Async Client
|
|
@@ -86,9 +84,7 @@ client = AsyncPulse(
|
|
|
86
84
|
|
|
87
85
|
|
|
88
86
|
async def main() -> None:
|
|
89
|
-
await client.extract(
|
|
90
|
-
file_url="fileUrl",
|
|
91
|
-
)
|
|
87
|
+
await client.extract()
|
|
92
88
|
|
|
93
89
|
|
|
94
90
|
asyncio.run(main())
|
|
@@ -39,9 +39,7 @@ from pulse import Pulse
|
|
|
39
39
|
client = Pulse(
|
|
40
40
|
api_key="YOUR_API_KEY",
|
|
41
41
|
)
|
|
42
|
-
client.extract(
|
|
43
|
-
file_url="fileUrl",
|
|
44
|
-
)
|
|
42
|
+
client.extract()
|
|
45
43
|
```
|
|
46
44
|
|
|
47
45
|
## Async Client
|
|
@@ -59,9 +57,7 @@ client = AsyncPulse(
|
|
|
59
57
|
|
|
60
58
|
|
|
61
59
|
async def main() -> None:
|
|
62
|
-
await client.extract(
|
|
63
|
-
file_url="fileUrl",
|
|
64
|
-
)
|
|
60
|
+
await client.extract()
|
|
65
61
|
|
|
66
62
|
|
|
67
63
|
asyncio.run(main())
|
|
@@ -5,15 +5,20 @@ from __future__ import annotations
|
|
|
5
5
|
import typing
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
|
+
from . import core
|
|
8
9
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
10
|
from .core.request_options import RequestOptions
|
|
10
11
|
from .environment import PulseEnvironment
|
|
11
12
|
from .raw_client import AsyncRawPulse, RawPulse
|
|
13
|
+
from .types.extract_async_request_experimental_schema import ExtractAsyncRequestExperimentalSchema
|
|
14
|
+
from .types.extract_async_request_schema import ExtractAsyncRequestSchema
|
|
15
|
+
from .types.extract_async_request_storage import ExtractAsyncRequestStorage
|
|
16
|
+
from .types.extract_async_request_structured_output import ExtractAsyncRequestStructuredOutput
|
|
12
17
|
from .types.extract_async_response import ExtractAsyncResponse
|
|
13
|
-
from .types.
|
|
14
|
-
from .types.
|
|
15
|
-
from .types.
|
|
16
|
-
from .types.
|
|
18
|
+
from .types.extract_request_experimental_schema import ExtractRequestExperimentalSchema
|
|
19
|
+
from .types.extract_request_schema import ExtractRequestSchema
|
|
20
|
+
from .types.extract_request_storage import ExtractRequestStorage
|
|
21
|
+
from .types.extract_request_structured_output import ExtractRequestStructuredOutput
|
|
17
22
|
from .types.extract_response import ExtractResponse
|
|
18
23
|
|
|
19
24
|
if typing.TYPE_CHECKING:
|
|
@@ -106,10 +111,11 @@ class Pulse:
|
|
|
106
111
|
def extract(
|
|
107
112
|
self,
|
|
108
113
|
*,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
file: typing.Optional[core.File] = OMIT,
|
|
115
|
+
file_url: typing.Optional[str] = OMIT,
|
|
116
|
+
structured_output: typing.Optional[ExtractRequestStructuredOutput] = OMIT,
|
|
117
|
+
schema: typing.Optional[ExtractRequestSchema] = OMIT,
|
|
118
|
+
experimental_schema: typing.Optional[ExtractRequestExperimentalSchema] = OMIT,
|
|
113
119
|
schema_prompt: typing.Optional[str] = OMIT,
|
|
114
120
|
custom_prompt: typing.Optional[str] = OMIT,
|
|
115
121
|
chunking: typing.Optional[str] = OMIT,
|
|
@@ -119,7 +125,7 @@ class Pulse:
|
|
|
119
125
|
figure_description: typing.Optional[bool] = OMIT,
|
|
120
126
|
return_html: typing.Optional[bool] = OMIT,
|
|
121
127
|
thinking: typing.Optional[bool] = OMIT,
|
|
122
|
-
storage: typing.Optional[
|
|
128
|
+
storage: typing.Optional[ExtractRequestStorage] = OMIT,
|
|
123
129
|
request_options: typing.Optional[RequestOptions] = None,
|
|
124
130
|
) -> ExtractResponse:
|
|
125
131
|
"""
|
|
@@ -129,16 +135,19 @@ class Pulse:
|
|
|
129
135
|
|
|
130
136
|
Parameters
|
|
131
137
|
----------
|
|
132
|
-
|
|
133
|
-
|
|
138
|
+
file : typing.Optional[core.File]
|
|
139
|
+
See core.File for more documentation
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
file_url : typing.Optional[str]
|
|
142
|
+
Public or pre-signed URL that Pulse will download and extract. Required unless file is provided.
|
|
143
|
+
|
|
144
|
+
structured_output : typing.Optional[ExtractRequestStructuredOutput]
|
|
136
145
|
Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
137
146
|
|
|
138
|
-
schema : typing.Optional[
|
|
147
|
+
schema : typing.Optional[ExtractRequestSchema]
|
|
139
148
|
(Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
140
149
|
|
|
141
|
-
experimental_schema : typing.Optional[
|
|
150
|
+
experimental_schema : typing.Optional[ExtractRequestExperimentalSchema]
|
|
142
151
|
(Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
143
152
|
|
|
144
153
|
schema_prompt : typing.Optional[str]
|
|
@@ -168,7 +177,7 @@ class Pulse:
|
|
|
168
177
|
thinking : typing.Optional[bool]
|
|
169
178
|
(Deprecated) Enables expanded rationale output for debugging.
|
|
170
179
|
|
|
171
|
-
storage : typing.Optional[
|
|
180
|
+
storage : typing.Optional[ExtractRequestStorage]
|
|
172
181
|
Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
173
182
|
|
|
174
183
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -186,11 +195,10 @@ class Pulse:
|
|
|
186
195
|
client = Pulse(
|
|
187
196
|
api_key="YOUR_API_KEY",
|
|
188
197
|
)
|
|
189
|
-
client.extract(
|
|
190
|
-
file_url="fileUrl",
|
|
191
|
-
)
|
|
198
|
+
client.extract()
|
|
192
199
|
"""
|
|
193
200
|
_response = self._raw_client.extract(
|
|
201
|
+
file=file,
|
|
194
202
|
file_url=file_url,
|
|
195
203
|
structured_output=structured_output,
|
|
196
204
|
schema=schema,
|
|
@@ -212,10 +220,11 @@ class Pulse:
|
|
|
212
220
|
def extract_async(
|
|
213
221
|
self,
|
|
214
222
|
*,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
223
|
+
file: typing.Optional[core.File] = OMIT,
|
|
224
|
+
file_url: typing.Optional[str] = OMIT,
|
|
225
|
+
structured_output: typing.Optional[ExtractAsyncRequestStructuredOutput] = OMIT,
|
|
226
|
+
schema: typing.Optional[ExtractAsyncRequestSchema] = OMIT,
|
|
227
|
+
experimental_schema: typing.Optional[ExtractAsyncRequestExperimentalSchema] = OMIT,
|
|
219
228
|
schema_prompt: typing.Optional[str] = OMIT,
|
|
220
229
|
custom_prompt: typing.Optional[str] = OMIT,
|
|
221
230
|
chunking: typing.Optional[str] = OMIT,
|
|
@@ -225,7 +234,7 @@ class Pulse:
|
|
|
225
234
|
figure_description: typing.Optional[bool] = OMIT,
|
|
226
235
|
return_html: typing.Optional[bool] = OMIT,
|
|
227
236
|
thinking: typing.Optional[bool] = OMIT,
|
|
228
|
-
storage: typing.Optional[
|
|
237
|
+
storage: typing.Optional[ExtractAsyncRequestStorage] = OMIT,
|
|
229
238
|
request_options: typing.Optional[RequestOptions] = None,
|
|
230
239
|
) -> ExtractAsyncResponse:
|
|
231
240
|
"""
|
|
@@ -235,16 +244,19 @@ class Pulse:
|
|
|
235
244
|
|
|
236
245
|
Parameters
|
|
237
246
|
----------
|
|
238
|
-
|
|
239
|
-
|
|
247
|
+
file : typing.Optional[core.File]
|
|
248
|
+
See core.File for more documentation
|
|
249
|
+
|
|
250
|
+
file_url : typing.Optional[str]
|
|
251
|
+
Public or pre-signed URL that Pulse will download and extract. Required unless file is provided.
|
|
240
252
|
|
|
241
|
-
structured_output : typing.Optional[
|
|
253
|
+
structured_output : typing.Optional[ExtractAsyncRequestStructuredOutput]
|
|
242
254
|
Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
243
255
|
|
|
244
|
-
schema : typing.Optional[
|
|
256
|
+
schema : typing.Optional[ExtractAsyncRequestSchema]
|
|
245
257
|
(Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
246
258
|
|
|
247
|
-
experimental_schema : typing.Optional[
|
|
259
|
+
experimental_schema : typing.Optional[ExtractAsyncRequestExperimentalSchema]
|
|
248
260
|
(Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
249
261
|
|
|
250
262
|
schema_prompt : typing.Optional[str]
|
|
@@ -274,7 +286,7 @@ class Pulse:
|
|
|
274
286
|
thinking : typing.Optional[bool]
|
|
275
287
|
(Deprecated) Enables expanded rationale output for debugging.
|
|
276
288
|
|
|
277
|
-
storage : typing.Optional[
|
|
289
|
+
storage : typing.Optional[ExtractAsyncRequestStorage]
|
|
278
290
|
Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
279
291
|
|
|
280
292
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -292,11 +304,10 @@ class Pulse:
|
|
|
292
304
|
client = Pulse(
|
|
293
305
|
api_key="YOUR_API_KEY",
|
|
294
306
|
)
|
|
295
|
-
client.extract_async(
|
|
296
|
-
file_url="fileUrl",
|
|
297
|
-
)
|
|
307
|
+
client.extract_async()
|
|
298
308
|
"""
|
|
299
309
|
_response = self._raw_client.extract_async(
|
|
310
|
+
file=file,
|
|
300
311
|
file_url=file_url,
|
|
301
312
|
structured_output=structured_output,
|
|
302
313
|
schema=schema,
|
|
@@ -415,10 +426,11 @@ class AsyncPulse:
|
|
|
415
426
|
async def extract(
|
|
416
427
|
self,
|
|
417
428
|
*,
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
429
|
+
file: typing.Optional[core.File] = OMIT,
|
|
430
|
+
file_url: typing.Optional[str] = OMIT,
|
|
431
|
+
structured_output: typing.Optional[ExtractRequestStructuredOutput] = OMIT,
|
|
432
|
+
schema: typing.Optional[ExtractRequestSchema] = OMIT,
|
|
433
|
+
experimental_schema: typing.Optional[ExtractRequestExperimentalSchema] = OMIT,
|
|
422
434
|
schema_prompt: typing.Optional[str] = OMIT,
|
|
423
435
|
custom_prompt: typing.Optional[str] = OMIT,
|
|
424
436
|
chunking: typing.Optional[str] = OMIT,
|
|
@@ -428,7 +440,7 @@ class AsyncPulse:
|
|
|
428
440
|
figure_description: typing.Optional[bool] = OMIT,
|
|
429
441
|
return_html: typing.Optional[bool] = OMIT,
|
|
430
442
|
thinking: typing.Optional[bool] = OMIT,
|
|
431
|
-
storage: typing.Optional[
|
|
443
|
+
storage: typing.Optional[ExtractRequestStorage] = OMIT,
|
|
432
444
|
request_options: typing.Optional[RequestOptions] = None,
|
|
433
445
|
) -> ExtractResponse:
|
|
434
446
|
"""
|
|
@@ -438,16 +450,19 @@ class AsyncPulse:
|
|
|
438
450
|
|
|
439
451
|
Parameters
|
|
440
452
|
----------
|
|
441
|
-
|
|
442
|
-
|
|
453
|
+
file : typing.Optional[core.File]
|
|
454
|
+
See core.File for more documentation
|
|
455
|
+
|
|
456
|
+
file_url : typing.Optional[str]
|
|
457
|
+
Public or pre-signed URL that Pulse will download and extract. Required unless file is provided.
|
|
443
458
|
|
|
444
|
-
structured_output : typing.Optional[
|
|
459
|
+
structured_output : typing.Optional[ExtractRequestStructuredOutput]
|
|
445
460
|
Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
446
461
|
|
|
447
|
-
schema : typing.Optional[
|
|
462
|
+
schema : typing.Optional[ExtractRequestSchema]
|
|
448
463
|
(Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
449
464
|
|
|
450
|
-
experimental_schema : typing.Optional[
|
|
465
|
+
experimental_schema : typing.Optional[ExtractRequestExperimentalSchema]
|
|
451
466
|
(Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
452
467
|
|
|
453
468
|
schema_prompt : typing.Optional[str]
|
|
@@ -477,7 +492,7 @@ class AsyncPulse:
|
|
|
477
492
|
thinking : typing.Optional[bool]
|
|
478
493
|
(Deprecated) Enables expanded rationale output for debugging.
|
|
479
494
|
|
|
480
|
-
storage : typing.Optional[
|
|
495
|
+
storage : typing.Optional[ExtractRequestStorage]
|
|
481
496
|
Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
482
497
|
|
|
483
498
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -500,14 +515,13 @@ class AsyncPulse:
|
|
|
500
515
|
|
|
501
516
|
|
|
502
517
|
async def main() -> None:
|
|
503
|
-
await client.extract(
|
|
504
|
-
file_url="fileUrl",
|
|
505
|
-
)
|
|
518
|
+
await client.extract()
|
|
506
519
|
|
|
507
520
|
|
|
508
521
|
asyncio.run(main())
|
|
509
522
|
"""
|
|
510
523
|
_response = await self._raw_client.extract(
|
|
524
|
+
file=file,
|
|
511
525
|
file_url=file_url,
|
|
512
526
|
structured_output=structured_output,
|
|
513
527
|
schema=schema,
|
|
@@ -529,10 +543,11 @@ class AsyncPulse:
|
|
|
529
543
|
async def extract_async(
|
|
530
544
|
self,
|
|
531
545
|
*,
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
546
|
+
file: typing.Optional[core.File] = OMIT,
|
|
547
|
+
file_url: typing.Optional[str] = OMIT,
|
|
548
|
+
structured_output: typing.Optional[ExtractAsyncRequestStructuredOutput] = OMIT,
|
|
549
|
+
schema: typing.Optional[ExtractAsyncRequestSchema] = OMIT,
|
|
550
|
+
experimental_schema: typing.Optional[ExtractAsyncRequestExperimentalSchema] = OMIT,
|
|
536
551
|
schema_prompt: typing.Optional[str] = OMIT,
|
|
537
552
|
custom_prompt: typing.Optional[str] = OMIT,
|
|
538
553
|
chunking: typing.Optional[str] = OMIT,
|
|
@@ -542,7 +557,7 @@ class AsyncPulse:
|
|
|
542
557
|
figure_description: typing.Optional[bool] = OMIT,
|
|
543
558
|
return_html: typing.Optional[bool] = OMIT,
|
|
544
559
|
thinking: typing.Optional[bool] = OMIT,
|
|
545
|
-
storage: typing.Optional[
|
|
560
|
+
storage: typing.Optional[ExtractAsyncRequestStorage] = OMIT,
|
|
546
561
|
request_options: typing.Optional[RequestOptions] = None,
|
|
547
562
|
) -> ExtractAsyncResponse:
|
|
548
563
|
"""
|
|
@@ -552,16 +567,19 @@ class AsyncPulse:
|
|
|
552
567
|
|
|
553
568
|
Parameters
|
|
554
569
|
----------
|
|
555
|
-
|
|
556
|
-
|
|
570
|
+
file : typing.Optional[core.File]
|
|
571
|
+
See core.File for more documentation
|
|
572
|
+
|
|
573
|
+
file_url : typing.Optional[str]
|
|
574
|
+
Public or pre-signed URL that Pulse will download and extract. Required unless file is provided.
|
|
557
575
|
|
|
558
|
-
structured_output : typing.Optional[
|
|
576
|
+
structured_output : typing.Optional[ExtractAsyncRequestStructuredOutput]
|
|
559
577
|
Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
560
578
|
|
|
561
|
-
schema : typing.Optional[
|
|
579
|
+
schema : typing.Optional[ExtractAsyncRequestSchema]
|
|
562
580
|
(Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
563
581
|
|
|
564
|
-
experimental_schema : typing.Optional[
|
|
582
|
+
experimental_schema : typing.Optional[ExtractAsyncRequestExperimentalSchema]
|
|
565
583
|
(Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
566
584
|
|
|
567
585
|
schema_prompt : typing.Optional[str]
|
|
@@ -591,7 +609,7 @@ class AsyncPulse:
|
|
|
591
609
|
thinking : typing.Optional[bool]
|
|
592
610
|
(Deprecated) Enables expanded rationale output for debugging.
|
|
593
611
|
|
|
594
|
-
storage : typing.Optional[
|
|
612
|
+
storage : typing.Optional[ExtractAsyncRequestStorage]
|
|
595
613
|
Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
596
614
|
|
|
597
615
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -614,14 +632,13 @@ class AsyncPulse:
|
|
|
614
632
|
|
|
615
633
|
|
|
616
634
|
async def main() -> None:
|
|
617
|
-
await client.extract_async(
|
|
618
|
-
file_url="fileUrl",
|
|
619
|
-
)
|
|
635
|
+
await client.extract_async()
|
|
620
636
|
|
|
621
637
|
|
|
622
638
|
asyncio.run(main())
|
|
623
639
|
"""
|
|
624
640
|
_response = await self._raw_client.extract_async(
|
|
641
|
+
file=file,
|
|
625
642
|
file_url=file_url,
|
|
626
643
|
structured_output=structured_output,
|
|
627
644
|
schema=schema,
|
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "pulse-python-sdk/0.0.
|
|
25
|
+
"User-Agent": "pulse-python-sdk/0.0.54",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "pulse-python-sdk",
|
|
28
|
-
"X-Fern-SDK-Version": "0.0.
|
|
28
|
+
"X-Fern-SDK-Version": "0.0.54",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["x-api-key"] = self.api_key
|