@@ -113,10 +113,7 @@ from unstructured_client import UnstructuredClient
113113from unstructured_client.models import shared
114114from unstructured_client.utils import BackoffStrategy, RetryConfig
115115
116-
117- with UnstructuredClient(
118- server_url = " https://api.example.com" ,
119- ) as uc_client:
116+ with UnstructuredClient() as uc_client:
120117
121118 res = uc_client.destinations.create_destination(request = {
122119 " create_destination_connector" : {
@@ -144,9 +141,7 @@ from unstructured_client import UnstructuredClient
144141from unstructured_client.models import shared
145142from unstructured_client.utils import BackoffStrategy, RetryConfig
146143
147-
148144with UnstructuredClient(
149- server_url = " https://api.example.com" ,
150145 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
151146) as uc_client:
152147
@@ -198,10 +193,7 @@ When custom error responses are specified for an operation, the SDK may also rai
198193from unstructured_client import UnstructuredClient
199194from unstructured_client.models import errors, shared
200195
201-
202- with UnstructuredClient(
203- server_url = " https://api.example.com" ,
204- ) as uc_client:
196+ with UnstructuredClient() as uc_client:
205197 res = None
206198 try :
207199
@@ -333,10 +325,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
333325from unstructured_client import UnstructuredClient
334326from unstructured_client.models import shared
335327
336-
337- with UnstructuredClient(
338- server_url = " https://api.example.com" ,
339- ) as uc_client:
328+ with UnstructuredClient() as uc_client:
340329
341330 res = uc_client.destinations.create_destination(request = {
342331 " create_destination_connector" : {
@@ -366,10 +355,7 @@ from unstructured_client import UnstructuredClient
366355from unstructured_client.models import shared
367356
368357async def main ():
369-
370- async with UnstructuredClient(
371- server_url = " https://api.example.com" ,
372- ) as uc_client:
358+ async with UnstructuredClient() as uc_client:
373359
374360 res = await uc_client.destinations.create_destination_async(request = {
375361 " create_destination_connector" : {
@@ -465,10 +451,7 @@ Certain SDK methods accept file objects as part of a request body or multi-part
465451from unstructured_client import UnstructuredClient
466452from unstructured_client.models import shared
467453
468-
469- with UnstructuredClient(
470- server_url = " https://api.example.com" ,
471- ) as uc_client:
454+ with UnstructuredClient() as uc_client:
472455
473456 res = uc_client.general.partition(request = {
474457 " partition_parameters" : {
@@ -503,19 +486,13 @@ The `UnstructuredClient` class implements the context manager protocol and regis
503486``` python
504487from unstructured_client import UnstructuredClient
505488def main ():
506-
507- with UnstructuredClient(
508- server_url = " https://api.example.com" ,
509- ) as uc_client:
489+ with UnstructuredClient() as uc_client:
510490 # Rest of application here...
511491
512492
513493# Or when using async:
514494async def amain ():
515-
516- async with UnstructuredClient(
517- server_url = " https://api.example.com" ,
518- ) as uc_client:
495+ async with UnstructuredClient() as uc_client:
519496 # Rest of application here...
520497```
521498<!-- End Resource Management [resource-management] -->
@@ -531,7 +508,7 @@ from unstructured_client import UnstructuredClient
531508import logging
532509
533510logging.basicConfig(level = logging.DEBUG )
534- s = UnstructuredClient(server_url = " https://example.com " , debug_logger = logging.getLogger(" unstructured_client" ))
511+ s = UnstructuredClient(debug_logger = logging.getLogger(" unstructured_client" ))
535512```
536513<!-- End Debugging [debug] -->
537514
0 commit comments