Skip to content

Commit f9103bf

Browse files
authored
Remove some sections
1 parent 0c48834 commit f9103bf

File tree

1 file changed

+2
-169
lines changed

1 file changed

+2
-169
lines changed

README.md

Lines changed: 2 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -116,175 +116,8 @@ s = unstructured_client.UnstructuredClient(client: http_client)
116116
```
117117
<!-- End Custom HTTP Client -->
118118

119-
120-
121-
<!-- Start Retries -->
122-
# Retries
123-
124-
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.
125-
126-
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
127-
128-
129-
## Example
130-
131-
```python
132-
import unstructured_client
133-
from undefined.utils import BackoffStrategy, RetryConfig
134-
from unstructured_client.models import shared
135-
136-
s = unstructured_client.UnstructuredClient(
137-
api_key_auth="YOUR_API_KEY",
138-
)
139-
140-
req = shared.PartitionParameters(
141-
chunking_strategy='by_title',
142-
combine_under_n_chars=500,
143-
encoding='utf-8',
144-
files=shared.Files(
145-
content='0x2cC94b2FEF'.encode(),
146-
file_name='um.shtml',
147-
),
148-
gz_uncompressed_content_type='application/pdf',
149-
hi_res_model_name='yolox',
150-
languages=[
151-
'[',
152-
'e',
153-
'n',
154-
'g',
155-
']',
156-
],
157-
max_characters=1500,
158-
new_after_n_chars=1500,
159-
output_format='application/json',
160-
skip_infer_table_types=[
161-
'p',
162-
'd',
163-
'f',
164-
],
165-
strategy='hi_res',
166-
)
167-
168-
res = s.general.partition(req,
169-
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
170-
171-
if res.elements is not None:
172-
# handle response
173-
pass
174-
```
175-
176-
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
177-
178-
179-
## Example
180-
181-
```python
182-
import unstructured_client
183-
from undefined.utils import BackoffStrategy, RetryConfig
184-
from unstructured_client.models import shared
185-
186-
s = unstructured_client.UnstructuredClient(
187-
retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
188-
api_key_auth="YOUR_API_KEY",
189-
)
190-
191-
req = shared.PartitionParameters(
192-
chunking_strategy='by_title',
193-
combine_under_n_chars=500,
194-
encoding='utf-8',
195-
files=shared.Files(
196-
content='0x2cC94b2FEF'.encode(),
197-
file_name='um.shtml',
198-
),
199-
gz_uncompressed_content_type='application/pdf',
200-
hi_res_model_name='yolox',
201-
languages=[
202-
'[',
203-
'e',
204-
'n',
205-
'g',
206-
']',
207-
],
208-
max_characters=1500,
209-
new_after_n_chars=1500,
210-
output_format='application/json',
211-
skip_infer_table_types=[
212-
'p',
213-
'd',
214-
'f',
215-
],
216-
strategy='hi_res',
217-
)
218-
219-
res = s.general.partition(req)
220-
221-
if res.elements is not None:
222-
# handle response
223-
pass
224-
```
225-
226-
227-
<!-- End Retries -->
228-
229-
230-
231-
<!-- Start Authentication -->
232-
233-
# Authentication
234-
235-
## Per-Client Security Schemes
236-
237-
Your SDK supports the following security scheme globally:
238-
239-
| Name | Type | Scheme |
240-
| -------------- | -------------- | -------------- |
241-
| `api_key_auth` | apiKey | API key |
242-
243-
To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
244-
245-
```python
246-
import unstructured_client
247-
from unstructured_client.models import shared
248-
249-
s = unstructured_client.UnstructuredClient(
250-
api_key_auth="YOUR_API_KEY",
251-
)
252-
253-
req = shared.PartitionParameters(
254-
chunking_strategy='by_title',
255-
combine_under_n_chars=500,
256-
encoding='utf-8',
257-
files=shared.Files(
258-
content='0x2cC94b2FEF'.encode(),
259-
file_name='um.shtml',
260-
),
261-
gz_uncompressed_content_type='application/pdf',
262-
hi_res_model_name='yolox',
263-
languages=[
264-
'[',
265-
'e',
266-
'n',
267-
'g',
268-
']',
269-
],
270-
max_characters=1500,
271-
new_after_n_chars=1500,
272-
output_format='application/json',
273-
skip_infer_table_types=[
274-
'p',
275-
'd',
276-
'f',
277-
],
278-
strategy='hi_res',
279-
)
280-
281-
res = s.general.partition(req)
282-
283-
if res.elements is not None:
284-
# handle response
285-
pass
286-
```
287-
<!-- End Authentication -->
119+
<!-- No Retries -->
120+
<!-- No Authentication -->
288121

289122
<!-- Placeholder for Future Speakeasy SDK Sections -->
290123

0 commit comments

Comments
 (0)