|
1 | 1 | ---
|
2 |
| -title: Python and JavaScript SDKs |
3 |
| -description: This documentation covers the usage of the Python and JavaScript SDKs for interacting with the Unstructured API. |
| 2 | +title: Python and TypeScript SDKs |
| 3 | +description: This documentation covers the usage of the Python and TypeScript SDKs for interacting with the Unstructured API. |
4 | 4 | ---
|
5 | 5 |
|
6 | 6 | The [Python](https://github.com/Unstructured-IO/unstructured-python-client) and
|
7 |
| -[JavaScript](https://github.com/Unstructured-IO/unstructured-js-client) |
| 7 | +[TypeScript](https://github.com/Unstructured-IO/unstructured-js-client) |
8 | 8 | SDK clients allow for easy interaction with the Unstructured API. Whether you're using the
|
9 | 9 | free Unstructured API, the SaaS Unstructured API, Unstructured API on Azure/AWS or your local
|
10 |
| -deployment of Unstructured API, you can access the API using the Python or JavaScript SDK. |
| 10 | +deployment of Unstructured API, you can access the API using the Python or TypeScript SDK. |
11 | 11 |
|
12 | 12 | ## Installation
|
13 | 13 |
|
@@ -73,7 +73,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
73 | 73 | # Handle the response
|
74 | 74 | pass
|
75 | 75 | ```
|
76 |
| - ```javascript JavaScript |
| 76 | + ```javascript TypeScript |
77 | 77 | import { openAsBlob } from "node:fs";
|
78 | 78 | import { UnstructuredClient } from "unstructured-client";
|
79 | 79 | import { Strategy, ChunkingStrategy } from "unstructured-client/sdk/models/shared";
|
@@ -132,7 +132,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
132 | 132 | except SDKError as e:
|
133 | 133 | print(e)
|
134 | 134 | ```
|
135 |
| - ```javascript JavaScript (SDK <v0.10.6) |
| 135 | + ```javascript TypeScript (SDK <v0.10.6) |
136 | 136 | import { UnstructuredClient } from "unstructured-client";
|
137 | 137 | import { PartitionResponse } from "unstructured-client/dist/sdk/models/operations";
|
138 | 138 | import * as fs from "fs";
|
@@ -178,7 +178,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
178 | 178 | server_url="YOUR_API_URL",
|
179 | 179 | )
|
180 | 180 | ```
|
181 |
| - ```javascript JavaScript |
| 181 | + ```javascript TypeScript |
182 | 182 | const client = new UnstructuredClient({
|
183 | 183 | security: { apiKeyAuth: "YOUR_API_KEY" },
|
184 | 184 | serverURL: "YOUR_API_URL",
|
@@ -217,7 +217,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
217 | 217 | )
|
218 | 218 | res = client.general.partition(req)
|
219 | 219 | ```
|
220 |
| - ```javascript JavaScript |
| 220 | + ```javascript TypeScript |
221 | 221 | client.general.partition({
|
222 | 222 | partitionParameters: {
|
223 | 223 | files: {
|
@@ -258,7 +258,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
258 | 258 | )
|
259 | 259 | )
|
260 | 260 | ```
|
261 |
| - ```javascript JavaScript |
| 261 | + ```javascript TypeScript |
262 | 262 | const client = new UnstructuredClient({
|
263 | 263 | security: { apiKeyAuth: "YOUR_API_KEY" },
|
264 | 264 | serverURL: "YOUR_API_URL",
|
@@ -315,7 +315,7 @@ deployment of Unstructured API, you can access the API using the Python or JavaS
|
315 | 315 | ## Parameters & examples
|
316 | 316 |
|
317 | 317 | #### Parameter names
|
318 |
| - The parameter names used in this document are for the JavaScript SDK, which follow camelCase |
| 318 | + The parameter names used in this document are for the TypeScript SDK, which follow camelCase |
319 | 319 | convention (while the Python SDK uses snake_case). Other than this difference in naming convention,
|
320 | 320 | the names used in the SDKs are the same across all methods.
|
321 | 321 |
|
|
0 commit comments