@@ -47,7 +47,9 @@ from foundry import FoundryClient
4747from foundry import PalantirRPCException
4848from pprint import pprint
4949
50- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
50+ foundry_client = FoundryClient(
51+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
52+ )
5153
5254# DatasetRid | datasetRid
5355dataset_rid = " ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
@@ -62,9 +64,13 @@ branch_id = None
6264transaction_rid = None
6365
6466
65-
6667try :
67- api_response = foundry_client.datasets.File.delete(dataset_rid,file_path,branch_id = branch_idtransaction_rid = transaction_rid)
68+ api_response = foundry_client.datasets.Dataset.File.delete(
69+ dataset_rid,
70+ file_path,
71+ branch_id = branch_id,
72+ transaction_rid = transaction_rid,
73+ )
6874 print (" The delete response:\n " )
6975 pprint(api_response)
7076except PalantirRPCException as e:
@@ -132,7 +138,9 @@ from foundry import FoundryClient
132138from foundry import PalantirRPCException
133139from pprint import pprint
134140
135- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
141+ foundry_client = FoundryClient(
142+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
143+ )
136144
137145# DatasetRid | datasetRid
138146dataset_rid = " ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"
@@ -150,9 +158,14 @@ end_transaction_rid = None
150158start_transaction_rid = None
151159
152160
153-
154161try :
155- api_response = foundry_client.datasets.File.get(dataset_rid,file_path,branch_id = branch_idend_transaction_rid = end_transaction_ridstart_transaction_rid = start_transaction_rid)
162+ api_response = foundry_client.datasets.Dataset.File.get(
163+ dataset_rid,
164+ file_path,
165+ branch_id = branch_id,
166+ end_transaction_rid = end_transaction_rid,
167+ start_transaction_rid = start_transaction_rid,
168+ )
156169 print (" The get response:\n " )
157170 pprint(api_response)
158171except PalantirRPCException as e:
@@ -222,7 +235,9 @@ from foundry import FoundryClient
222235from foundry import PalantirRPCException
223236from pprint import pprint
224237
225- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
238+ foundry_client = FoundryClient(
239+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
240+ )
226241
227242# DatasetRid | datasetRid
228243dataset_rid = None
@@ -240,9 +255,14 @@ page_size = None
240255start_transaction_rid = None
241256
242257
243-
244258try :
245- for file in foundry_client.datasets.File.list(dataset_rid,branch_id = branch_idend_transaction_rid = end_transaction_ridpage_size = page_sizestart_transaction_rid = start_transaction_rid):
259+ for file in foundry_client.datasets.Dataset.File.list(
260+ dataset_rid,
261+ branch_id = branch_id,
262+ end_transaction_rid = end_transaction_rid,
263+ page_size = page_size,
264+ start_transaction_rid = start_transaction_rid,
265+ ):
246266 pprint(file )
247267except PalantirRPCException as e:
248268 print (" HTTP error when calling File.list: %s \n " % e)
@@ -332,7 +352,9 @@ from foundry import FoundryClient
332352from foundry import PalantirRPCException
333353from pprint import pprint
334354
335- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
355+ foundry_client = FoundryClient(
356+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
357+ )
336358
337359# DatasetRid | datasetRid
338360dataset_rid = None
@@ -353,9 +375,15 @@ page_token = None
353375start_transaction_rid = None
354376
355377
356-
357378try :
358- api_response = foundry_client.datasets.File.page(dataset_rid,branch_id = branch_idend_transaction_rid = end_transaction_ridpage_size = page_sizepage_token = page_tokenstart_transaction_rid = start_transaction_rid)
379+ api_response = foundry_client.datasets.Dataset.File.page(
380+ dataset_rid,
381+ branch_id = branch_id,
382+ end_transaction_rid = end_transaction_rid,
383+ page_size = page_size,
384+ page_token = page_token,
385+ start_transaction_rid = start_transaction_rid,
386+ )
359387 print (" The page response:\n " )
360388 pprint(api_response)
361389except PalantirRPCException as e:
@@ -424,7 +452,9 @@ from foundry import FoundryClient
424452from foundry import PalantirRPCException
425453from pprint import pprint
426454
427- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
455+ foundry_client = FoundryClient(
456+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
457+ )
428458
429459# DatasetRid | datasetRid
430460dataset_rid = None
@@ -442,9 +472,14 @@ end_transaction_rid = None
442472start_transaction_rid = None
443473
444474
445-
446475try :
447- api_response = foundry_client.datasets.File.read(dataset_rid,file_path,branch_id = branch_idend_transaction_rid = end_transaction_ridstart_transaction_rid = start_transaction_rid)
476+ api_response = foundry_client.datasets.Dataset.File.read(
477+ dataset_rid,
478+ file_path,
479+ branch_id = branch_id,
480+ end_transaction_rid = end_transaction_rid,
481+ start_transaction_rid = start_transaction_rid,
482+ )
448483 print (" The read response:\n " )
449484 pprint(api_response)
450485except PalantirRPCException as e:
@@ -509,7 +544,9 @@ from foundry import FoundryClient
509544from foundry import PalantirRPCException
510545from pprint import pprint
511546
512- foundry_client = FoundryClient(auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com" )
547+ foundry_client = FoundryClient(
548+ auth = foundry.UserTokenAuth(... ), hostname = " example.palantirfoundry.com"
549+ )
513550
514551# DatasetRid | datasetRid
515552dataset_rid = None
@@ -530,9 +567,15 @@ transaction_rid = None
530567transaction_type = None
531568
532569
533-
534570try :
535- api_response = foundry_client.datasets.File.upload(dataset_rid,body,file_path = file_pathbranch_id = branch_idtransaction_rid = transaction_ridtransaction_type = transaction_type)
571+ api_response = foundry_client.datasets.Dataset.File.upload(
572+ dataset_rid,
573+ body,
574+ file_path = file_path,
575+ branch_id = branch_id,
576+ transaction_rid = transaction_rid,
577+ transaction_type = transaction_type,
578+ )
536579 print (" The upload response:\n " )
537580 pprint(api_response)
538581except PalantirRPCException as e:
0 commit comments