@@ -113,9 +113,7 @@ from unstructured_client import UnstructuredClient
113113from unstructured_client.models import shared
114114from unstructured_client.utils import BackoffStrategy, RetryConfig
115115
116- with UnstructuredClient(
117- server_url = " https://api.example.com" ,
118- ) as uc_client:
116+ with UnstructuredClient() as uc_client:
119117
120118 res = uc_client.destinations.create_destination(request = {
121119 " create_destination_connector" : {
@@ -144,7 +142,6 @@ from unstructured_client.models import shared
144142from unstructured_client.utils import BackoffStrategy, RetryConfig
145143
146144with UnstructuredClient(
147- server_url = " https://api.example.com" ,
148145 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
149146) as uc_client:
150147
@@ -196,9 +193,7 @@ When custom error responses are specified for an operation, the SDK may also rai
196193from unstructured_client import UnstructuredClient
197194from unstructured_client.models import errors, shared
198195
199- with UnstructuredClient(
200- server_url = " https://api.example.com" ,
201- ) as uc_client:
196+ with UnstructuredClient() as uc_client:
202197 res = None
203198 try :
204199
@@ -330,9 +325,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
330325from unstructured_client import UnstructuredClient
331326from unstructured_client.models import shared
332327
333- with UnstructuredClient(
334- server_url = " https://api.example.com" ,
335- ) as uc_client:
328+ with UnstructuredClient() as uc_client:
336329
337330 res = uc_client.destinations.create_destination(request = {
338331 " create_destination_connector" : {
@@ -362,9 +355,7 @@ from unstructured_client import UnstructuredClient
362355from unstructured_client.models import shared
363356
364357async def main ():
365- async with UnstructuredClient(
366- server_url = " https://api.example.com" ,
367- ) as uc_client:
358+ async with UnstructuredClient() as uc_client:
368359
369360 res = await uc_client.destinations.create_destination_async(request = {
370361 " create_destination_connector" : {
@@ -459,9 +450,7 @@ Certain SDK methods accept file objects as part of a request body or multi-part
459450``` python
460451from unstructured_client import UnstructuredClient
461452
462- with UnstructuredClient(
463- server_url = " https://api.example.com" ,
464- ) as uc_client:
453+ with UnstructuredClient() as uc_client:
465454
466455 res = uc_client.general.partition(request = {
467456 " partition_parameters" : {
@@ -494,17 +483,13 @@ The `UnstructuredClient` class implements the context manager protocol and regis
494483``` python
495484from unstructured_client import UnstructuredClient
496485def main ():
497- with UnstructuredClient(
498- server_url = " https://api.example.com" ,
499- ) as uc_client:
486+ with UnstructuredClient() as uc_client:
500487 # Rest of application here...
501488
502489
503490# Or when using async:
504491async def amain ():
505- async with UnstructuredClient(
506- server_url = " https://api.example.com" ,
507- ) as uc_client:
492+ async with UnstructuredClient() as uc_client:
508493 # Rest of application here...
509494```
510495<!-- End Resource Management [resource-management] -->
@@ -520,7 +505,7 @@ from unstructured_client import UnstructuredClient
520505import logging
521506
522507logging.basicConfig(level = logging.DEBUG )
523- s = UnstructuredClient(server_url = " https://example.com " , debug_logger = logging.getLogger(" unstructured_client" ))
508+ s = UnstructuredClient(debug_logger = logging.getLogger(" unstructured_client" ))
524509```
525510<!-- End Debugging [debug] -->
526511
0 commit comments