@@ -113,16 +113,16 @@ from unstructured_client import UnstructuredClient
113113from unstructured_client.models import shared
114114from unstructured_client.utils import BackoffStrategy, RetryConfig
115115
116- with UnstructuredClient() as uc_client:
116+ with UnstructuredClient(
117+ server_url = " https://api.example.com" ,
118+ ) as uc_client:
117119
118120 res = uc_client.destinations.create_destination(request = {
119121 " create_destination_connector" : {
120122 " config" : {
121- " account_key" : " azure_account_key" ,
122- " account_name" : " azure_account_name" ,
123- " anonymous" : False ,
124- " recursive" : True ,
125- " remote_url" : " az://<path></path></container-name>" ,
123+ " endpoint" : " <value>" ,
124+ " index" : " <value>" ,
125+ " key" : " <key>" ,
126126 },
127127 " name" : " <value>" ,
128128 " type" : shared.DestinationConnectorType.ASTRADB ,
@@ -144,17 +144,16 @@ from unstructured_client.models import shared
144144from unstructured_client.utils import BackoffStrategy, RetryConfig
145145
146146with UnstructuredClient(
147+ server_url = " https://api.example.com" ,
147148 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
148149) as uc_client:
149150
150151 res = uc_client.destinations.create_destination(request = {
151152 " create_destination_connector" : {
152153 " config" : {
153- " account_key" : " azure_account_key" ,
154- " account_name" : " azure_account_name" ,
155- " anonymous" : False ,
156- " recursive" : True ,
157- " remote_url" : " az://<path></path></container-name>" ,
154+ " endpoint" : " <value>" ,
155+ " index" : " <value>" ,
156+ " key" : " <key>" ,
158157 },
159158 " name" : " <value>" ,
160159 " type" : shared.DestinationConnectorType.ASTRADB ,
@@ -197,18 +196,18 @@ When custom error responses are specified for an operation, the SDK may also rai
197196from unstructured_client import UnstructuredClient
198197from unstructured_client.models import errors, shared
199198
200- with UnstructuredClient() as uc_client:
199+ with UnstructuredClient(
200+ server_url = " https://api.example.com" ,
201+ ) as uc_client:
201202 res = None
202203 try :
203204
204205 res = uc_client.destinations.create_destination(request = {
205206 " create_destination_connector" : {
206207 " config" : {
207- " account_key" : " azure_account_key" ,
208- " account_name" : " azure_account_name" ,
209- " anonymous" : False ,
210- " recursive" : True ,
211- " remote_url" : " az://<path></path></container-name>" ,
208+ " endpoint" : " <value>" ,
209+ " index" : " <value>" ,
210+ " key" : " <key>" ,
212211 },
213212 " name" : " <value>" ,
214213 " type" : shared.DestinationConnectorType.ASTRADB ,
@@ -331,16 +330,16 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
331330from unstructured_client import UnstructuredClient
332331from unstructured_client.models import shared
333332
334- with UnstructuredClient() as uc_client:
333+ with UnstructuredClient(
334+ server_url = " https://api.example.com" ,
335+ ) as uc_client:
335336
336337 res = uc_client.destinations.create_destination(request = {
337338 " create_destination_connector" : {
338339 " config" : {
339- " account_key" : " azure_account_key" ,
340- " account_name" : " azure_account_name" ,
341- " anonymous" : False ,
342- " recursive" : True ,
343- " remote_url" : " az://<path></path></container-name>" ,
340+ " endpoint" : " <value>" ,
341+ " index" : " <value>" ,
342+ " key" : " <key>" ,
344343 },
345344 " name" : " <value>" ,
346345 " type" : shared.DestinationConnectorType.ASTRADB ,
@@ -363,16 +362,16 @@ from unstructured_client import UnstructuredClient
363362from unstructured_client.models import shared
364363
365364async def main ():
366- async with UnstructuredClient() as uc_client:
365+ async with UnstructuredClient(
366+ server_url = " https://api.example.com" ,
367+ ) as uc_client:
367368
368369 res = await uc_client.destinations.create_destination_async(request = {
369370 " create_destination_connector" : {
370371 " config" : {
371- " account_key" : " azure_account_key" ,
372- " account_name" : " azure_account_name" ,
373- " anonymous" : False ,
374- " recursive" : True ,
375- " remote_url" : " az://<path></path></container-name>" ,
372+ " endpoint" : " <value>" ,
373+ " index" : " <value>" ,
374+ " key" : " <key>" ,
376375 },
377376 " name" : " <value>" ,
378377 " type" : shared.DestinationConnectorType.ASTRADB ,
@@ -460,7 +459,9 @@ Certain SDK methods accept file objects as part of a request body or multi-part
460459``` python
461460from unstructured_client import UnstructuredClient
462461
463- with UnstructuredClient() as uc_client:
462+ with UnstructuredClient(
463+ server_url = " https://api.example.com" ,
464+ ) as uc_client:
464465
465466 res = uc_client.general.partition(request = {
466467 " partition_parameters" : {
@@ -493,13 +494,17 @@ The `UnstructuredClient` class implements the context manager protocol and regis
493494``` python
494495from unstructured_client import UnstructuredClient
495496def main ():
496- with UnstructuredClient() as uc_client:
497+ with UnstructuredClient(
498+ server_url = " https://api.example.com" ,
499+ ) as uc_client:
497500 # Rest of application here...
498501
499502
500503# Or when using async:
501504async def amain ():
502- async with UnstructuredClient() as uc_client:
505+ async with UnstructuredClient(
506+ server_url = " https://api.example.com" ,
507+ ) as uc_client:
503508 # Rest of application here...
504509```
505510<!-- End Resource Management [resource-management] -->
@@ -515,7 +520,7 @@ from unstructured_client import UnstructuredClient
515520import logging
516521
517522logging.basicConfig(level = logging.DEBUG )
518- s = UnstructuredClient(debug_logger = logging.getLogger(" unstructured_client" ))
523+ s = UnstructuredClient(server_url = " https://example.com " , debug_logger = logging.getLogger(" unstructured_client" ))
519524```
520525<!-- End Debugging [debug] -->
521526
0 commit comments