forked from Unstructured-IO/unstructured-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeSamples.yaml
36 lines (32 loc) · 1.07 KB
/
codeSamples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
overlay: 1.0.0
info:
title: CodeSamples overlay for python target
version: 0.0.0
actions:
- target: $["paths"]["/general/v0/general"]["post"]
update:
x-codeSamples:
- lang: python
label: partition
source: |-
import unstructured_client
from unstructured_client.models import operations, shared
s = unstructured_client.UnstructuredClient(
api_key_auth="YOUR_API_KEY",
)
res = s.general.partition(request=operations.PartitionRequest(
partition_parameters=shared.PartitionParameters(
files=shared.Files(
file_name='your_file_here',
content='0x2cC94b2FEF'.encode(),
),
strategy=shared.Strategy.AUTO,
split_pdf_page_range=[
1,
10,
],
),
))
if res.elements is not None:
# handle response
pass