You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,7 +208,7 @@ with UnstructuredClient() as uc_client:
208
208
### Error Classes
209
209
**Primary errors:**
210
210
*[`UnstructuredClientError`](./src/unstructured_client/models/errors/unstructuredclienterror.py): The base class for HTTP error responses.
211
-
*[`HTTPValidationError`](./src/unstructured_client/models/errors/httpvalidationerror.py): Validation Error. Status code `422`.
211
+
*[`HTTPValidationError`](./src/unstructured_client/models/errors/httpvalidationerror.py): Validation Error. Status code `422`. *
212
212
213
213
<details><summary>Less common errors (6)</summary>
214
214
@@ -221,7 +221,7 @@ with UnstructuredClient() as uc_client:
221
221
222
222
223
223
**Inherit from [`UnstructuredClientError`](./src/unstructured_client/models/errors/unstructuredclienterror.py)**:
224
-
*[`ServerError`](./src/unstructured_client/models/errors/servererror.py): Server Error. Status code `5XX`. Applicable to 1 of 30 methods.*
224
+
*[`ServerError`](./src/unstructured_client/models/errors/servererror.py): Server Error. Status code `5XX`. Applicable to 1 of 37 methods.*
225
225
*[`ResponseValidationError`](./src/unstructured_client/models/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.
226
226
227
227
</details>
@@ -439,20 +439,33 @@ Certain SDK methods accept file objects as part of a request body or multi-part
439
439
440
440
```python
441
441
from unstructured_client import UnstructuredClient
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.oauth.device_code_api_v1_oauth_device_code_post(request={})\n\n assert res.device_code_response is not None\n\n # Handle response\n print(res.device_code_response)"
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.oauth.verify_page_api_v1_oauth_verify_get()\n\n assert res.res is not None\n\n # Handle response\n print(res.res)"
"source": "from unstructured_client import UnstructuredClient\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.oauth.whoami_api_v1_oauth_whoami_get(request={})\n\n assert res.response_whoami_api_v1_oauth_whoami_get is not None\n\n # Handle response\n print(res.response_whoami_api_v1_oauth_whoami_get)"
90
132
- target: $["paths"]["/api/v1/sources/"]["get"]
91
133
update:
92
134
"x-codeSamples":
@@ -98,7 +140,7 @@ actions:
98
140
"x-codeSamples":
99
141
- "lang": "python"
100
142
"label": "create_source"
101
-
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.create_source(request={\n\"create_source_connector\": {\n\"name\": \"<value>\",\n\"type\": shared.SourceConnectorType.DROPBOX,\n\"config\": {\n\"box_app_config\": \"<value>\",\n\"remote_url\": \"https://ugly-ribbon.info\",\n\"recursive\": True,\n},\n },\n})\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)"
143
+
"source": "from unstructured_client import UnstructuredClient\nfrom unstructured_client.models import operations, shared\n\n\nwith UnstructuredClient() as uc_client:\n\n res = uc_client.sources.create_source(request=operations.CreateSourceRequest(\n create_source_connector=shared.CreateSourceConnector(\n name=\"<value>\",\n type=shared.SourceConnectorType.BOX,\n config={\n\"host\": \"ugly-ribbon.info\",\n\"database\": \"<value>\",\n\"port\": 526676,\n\"username\": \"Albertha_Senger\",\n\"password\": \"jIalrq2izU8rFxd\",\n\"table_name\": \"<value>\",\n\"batch_size\": 637100,\n\"id_column\": \"id\",\n},\n ),\n ))\n\n assert res.source_connector_information is not None\n\n # Handle response\n print(res.source_connector_information)"
|`status_code`|*int*|:heavy_check_mark:| HTTP response status code for this operation |
11
+
|`raw_response`|[httpx.Response](https://www.python-httpx.org/api/#response)|:heavy_check_mark:| Raw HTTP response; suitable for custom response parsing |
|`content_type`|*str*|:heavy_check_mark:| HTTP response content type for this operation |
9
+
|`status_code`|*int*|:heavy_check_mark:| HTTP response status code for this operation |
10
+
|`raw_response`|[httpx.Response](https://www.python-httpx.org/api/#response)|:heavy_check_mark:| Raw HTTP response; suitable for custom response parsing |
|`content_type`|*str*|:heavy_check_mark:| HTTP response content type for this operation |
9
+
|`status_code`|*int*|:heavy_check_mark:| HTTP response status code for this operation |
10
+
|`raw_response`|[httpx.Response](https://www.python-httpx.org/api/#response)|:heavy_check_mark:| Raw HTTP response; suitable for custom response parsing |
0 commit comments