Skip to content

Commit 3f46ff2

Browse files
authored
Update base server example
1 parent 9674915 commit 3f46ff2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,21 @@ except SDKError as e:
7272
If you are self hosting the API, or developing locally, you can change the server URL when setting up the client.
7373

7474
```python
75-
s = UnstructuredClient()
76-
7775
# Using a local server
78-
s.general.sdk_configuration.server_url = "http://localhost:8000"
76+
s = unstructured_client.UnstructuredClient(
77+
server_url="http://localhost:8000",
78+
security=shared.Security(
79+
api_key_auth=api_key,
80+
),
81+
)
7982

8083
# Using your own server
81-
s.general.sdk_configuration.server_url = "https://your-server"
84+
s = unstructured_client.UnstructuredClient(
85+
server_url="https://your-server",
86+
security=shared.Security(
87+
api_key_auth=api_key,
88+
),
89+
)
8290
```
8391

8492
<!-- Start Dev Containers -->

0 commit comments

Comments
 (0)