msfabricpysdkcore 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- msfabricpysdkcore/auth.py +1 -1
- msfabricpysdkcore/coreapi.py +26 -0
- msfabricpysdkcore/item.py +2 -0
- msfabricpysdkcore/workspace.py +2 -0
- {msfabricpysdkcore-0.1.6.dist-info → msfabricpysdkcore-0.1.8.dist-info}/METADATA +17 -1
- {msfabricpysdkcore-0.1.6.dist-info → msfabricpysdkcore-0.1.8.dist-info}/RECORD +9 -9
- {msfabricpysdkcore-0.1.6.dist-info → msfabricpysdkcore-0.1.8.dist-info}/WHEEL +1 -1
- {msfabricpysdkcore-0.1.6.dist-info → msfabricpysdkcore-0.1.8.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.1.6.dist-info → msfabricpysdkcore-0.1.8.dist-info}/top_level.txt +0 -0
msfabricpysdkcore/auth.py
CHANGED
@@ -85,7 +85,7 @@ class FabricSparkUtilsAuthentication(FabricAuth):
|
|
85
85
|
"""FabricSparkUtilsAuthentication class to interact with Entra ID"""
|
86
86
|
|
87
87
|
def __init__(self, scope, silent=None):
|
88
|
-
|
88
|
+
super().__init__(scope)
|
89
89
|
|
90
90
|
mssparkutils.credentials.getToken("pbi")
|
91
91
|
self._logger.info("Using Synapse Spark Utils for authentication")
|
msfabricpysdkcore/coreapi.py
CHANGED
@@ -961,6 +961,30 @@ class FabricClientCore(FabricClient):
|
|
961
961
|
|
962
962
|
return response.status_code
|
963
963
|
|
964
|
+
# GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/shortcuts
|
965
|
+
|
966
|
+
def list_shortcuts(self, workspace_id, item_id, parent_path = None):
|
967
|
+
"""List the shortcuts in the item
|
968
|
+
Args:
|
969
|
+
workspace_id (str): The ID of the workspace
|
970
|
+
item_id (str): The ID of the item
|
971
|
+
parent_path (str): The starting path from which to retrieve the shortcuts
|
972
|
+
Returns:
|
973
|
+
list: The list of shortcuts
|
974
|
+
"""
|
975
|
+
from msfabricpysdkcore.onelakeshortcut import OneLakeShortcut
|
976
|
+
|
977
|
+
url = f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id}/items/{item_id}/shortcuts"
|
978
|
+
if parent_path:
|
979
|
+
url += f"?parentPath={parent_path}"
|
980
|
+
|
981
|
+
shortcuts = self.calling_routine(url, operation="GET", response_codes=[200, 429], error_message="Error listing shortcuts", return_format="value_json", paging=True)
|
982
|
+
|
983
|
+
for shortcut in shortcuts:
|
984
|
+
shortcut['workspaceId'] = workspace_id
|
985
|
+
shortcut['itemId'] = item_id
|
986
|
+
return [OneLakeShortcut.from_dict(shortcut, core_client=self) for shortcut in shortcuts]
|
987
|
+
|
964
988
|
### Workspaces
|
965
989
|
|
966
990
|
def add_workspace_role_assignment(self, workspace_id, role, principal):
|
@@ -1127,6 +1151,8 @@ class FabricClientCore(FabricClient):
|
|
1127
1151
|
if ws.display_name == name:
|
1128
1152
|
return ws
|
1129
1153
|
|
1154
|
+
raise Exception(f"Workspace with name {name} not found")
|
1155
|
+
|
1130
1156
|
def get_workspace_role_assignment(self, workspace_id, workspace_role_assignment_id):
|
1131
1157
|
"""Get a role assignment for a workspace
|
1132
1158
|
Args:
|
msfabricpysdkcore/item.py
CHANGED
@@ -91,6 +91,8 @@ class Item:
|
|
91
91
|
return self.core_client.get_shortcut(workspace_id=self.workspace_id, item_id=self.id,
|
92
92
|
path=path, name=name)
|
93
93
|
|
94
|
+
def list_shortcuts(self, parent_path = None):
|
95
|
+
return self.core_client.list_shortcuts(workspace_id=self.workspace_id, item_id=self.id, parent_path=parent_path)
|
94
96
|
|
95
97
|
# Job Scheduler
|
96
98
|
|
msfabricpysdkcore/workspace.py
CHANGED
@@ -226,6 +226,8 @@ class Workspace:
|
|
226
226
|
def get_shortcut(self, item_id, path, name):
|
227
227
|
return self.core_client.get_shortcut(self.id, item_id, path=path, name=name)
|
228
228
|
|
229
|
+
def list_shortcuts(self, item_id, parent_path = None):
|
230
|
+
return self.core_client.list_shortcuts(self.id, item_id, parent_path=parent_path)
|
229
231
|
|
230
232
|
def cancel_item_job_instance(self, item_id, job_instance_id):
|
231
233
|
return self.core_client.cancel_item_job_instance(workspace_id=self.id, item_id=item_id,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: msfabricpysdkcore
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.8
|
4
4
|
Summary: A Python SDK for Microsoft Fabric
|
5
5
|
Author: Andreas Rederer
|
6
6
|
Project-URL: Homepage, https://github.com/DaSenf1860/ms-fabric-sdk-core
|
@@ -12,6 +12,7 @@ Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
13
13
|
Requires-Dist: requests >=2.30.0
|
14
14
|
Requires-Dist: azure-identity >=1.15.0
|
15
|
+
Requires-Dist: msal >=1.28.0
|
15
16
|
|
16
17
|
# Python SDK for Microsoft Fabric
|
17
18
|
|
@@ -454,6 +455,21 @@ ws.delete_shortcut(item_id="item_id",
|
|
454
455
|
item.delete_shortcut(path="path",
|
455
456
|
name="name")
|
456
457
|
|
458
|
+
# List shortcuts of an item
|
459
|
+
|
460
|
+
fc.list_shortcuts(workspace_id="workspace_id",
|
461
|
+
item_id="item_id",
|
462
|
+
# optional parent_path="Tables"
|
463
|
+
)
|
464
|
+
|
465
|
+
# or
|
466
|
+
ws.list_shortcuts(item_id="item_id",
|
467
|
+
# optional parent_path="Tables"
|
468
|
+
)
|
469
|
+
|
470
|
+
# or
|
471
|
+
item.list_shortcuts(parent_path="Tables")
|
472
|
+
|
457
473
|
```
|
458
474
|
|
459
475
|
|
@@ -2,27 +2,27 @@ msfabricpysdkcore/__init__.py,sha256=ObRW5Q8IMqrvA6VH6zXSv3n01AzRCGjn5RojJXAR6VE
|
|
2
2
|
msfabricpysdkcore/admin_item.py,sha256=9L09Kb7kn7JW0bqVu1qPOMT6oHLduX4Q5_qhVJZTLxQ,3290
|
3
3
|
msfabricpysdkcore/admin_workspace.py,sha256=umNnIF8sf5Y8BDgfQdfG6sOZrQQc7RJINL9j8DPnm3c,3180
|
4
4
|
msfabricpysdkcore/adminapi.py,sha256=90OcFVXYhv6wf3bQCwspbw-NRxVugrgACkyru-h79MU,26188
|
5
|
-
msfabricpysdkcore/auth.py,sha256=
|
5
|
+
msfabricpysdkcore/auth.py,sha256=Y9YUDqoArvkD7rLnbQvNBnCXqHJtw6PDRUHMx0CVMT0,4330
|
6
6
|
msfabricpysdkcore/capacity.py,sha256=Q_2-XrZtdf9F67fY0qU3D0ocEOGQq4KtIXAv9dXjQhI,1761
|
7
7
|
msfabricpysdkcore/client.py,sha256=KpHREbfzQRRighyJzyES3COZP3raK0C1-WhxGd07LHU,7890
|
8
|
-
msfabricpysdkcore/coreapi.py,sha256=
|
8
|
+
msfabricpysdkcore/coreapi.py,sha256=G6ebCj0bokAucLDVaupqwObglsjWdNz55OU0enMWNbo,133536
|
9
9
|
msfabricpysdkcore/deployment_pipeline.py,sha256=2d7BqRPgfBiAlQOP4UfYLmFMM8xonSjPkJKhevIKGEY,5756
|
10
10
|
msfabricpysdkcore/domain.py,sha256=92IVvZ3jXHIT1a0zlTPD7uoQX6TcBBE_Y_b4dScxHSU,6949
|
11
11
|
msfabricpysdkcore/environment.py,sha256=4k2Le1mAQIrfcpNc3n1DbgdCzAldGTSTCbiDQGk0DlA,2784
|
12
12
|
msfabricpysdkcore/fabric_azure_capacity.py,sha256=7JxMp9weiKG_mDjlRK-88oIXr0kdG0pzv-Ouycf3fus,2808
|
13
13
|
msfabricpysdkcore/fabric_azure_client.py,sha256=I7Z0Y8Xy_esQcPaXgPL7EAkQmoQkAklJO4hxk_90dno,10722
|
14
|
-
msfabricpysdkcore/item.py,sha256=
|
14
|
+
msfabricpysdkcore/item.py,sha256=4HGUtxkMifQuzG13r2MUi01YtbbKucGno_zYQXrereU,6549
|
15
15
|
msfabricpysdkcore/job_instance.py,sha256=HXSUVoE4XaG2Ic5RYZ1Mx3ymiIarHDAnyjaXXY4Aj74,2381
|
16
16
|
msfabricpysdkcore/lakehouse.py,sha256=yIrzatWM9emPn-Y54Cg_ZdAydIWjxrpK65jIQ4SClgE,1703
|
17
17
|
msfabricpysdkcore/long_running_operation.py,sha256=XTlsueSZKVFICxhx99geEQ6btZFlFb8-lssigmQ9c6Y,2133
|
18
18
|
msfabricpysdkcore/onelakeshortcut.py,sha256=H02wR6Z86qTEJOwVRMKz1Ou3K88Y9pfJa91vizjprvo,1661
|
19
19
|
msfabricpysdkcore/otheritems.py,sha256=rkIbF-LxUUZh0ZDqFiWeutMeIsBXw_R8UUCglIifWBQ,12024
|
20
20
|
msfabricpysdkcore/spark_custom_pool.py,sha256=YsEULaQG-FO507aPIb-4kk93ZWBmDZj6fbOEHYoyxHE,3188
|
21
|
-
msfabricpysdkcore/workspace.py,sha256=
|
21
|
+
msfabricpysdkcore/workspace.py,sha256=2hHWThjYBq3_DJq8o9ni-aqVg-ENXob5kdkhIq0IM0c,40579
|
22
22
|
msfabricpysdkcore/util/__init__.py,sha256=p-1dC4AurfKdIUppNVlRCIcmwHBTURqfgIwxcie3fEA,50
|
23
23
|
msfabricpysdkcore/util/logger.py,sha256=XXdeaqI-BhXZgacChKrWP88TPU4FTWvS8L0YWjCT54A,1166
|
24
|
-
msfabricpysdkcore-0.1.
|
25
|
-
msfabricpysdkcore-0.1.
|
26
|
-
msfabricpysdkcore-0.1.
|
27
|
-
msfabricpysdkcore-0.1.
|
28
|
-
msfabricpysdkcore-0.1.
|
24
|
+
msfabricpysdkcore-0.1.8.dist-info/LICENSE,sha256=1NrGuF-zOmzbwzk3iI6lsP9koyDeKO1B0-8OD_tTvOQ,1156
|
25
|
+
msfabricpysdkcore-0.1.8.dist-info/METADATA,sha256=RVyWCfZRGRMpQv_Lrog7Sr6D9bff0B0r_bAW6ZWg5dE,23742
|
26
|
+
msfabricpysdkcore-0.1.8.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
27
|
+
msfabricpysdkcore-0.1.8.dist-info/top_level.txt,sha256=3iRonu6ptDGQN4Yl6G76XGM7xbFNsskiEHW-P2gMQGY,18
|
28
|
+
msfabricpysdkcore-0.1.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|