msfabricpysdkcore 0.1.6__tar.gz → 0.1.8__tar.gz
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-0.1.6 → msfabricpysdkcore-0.1.8}/PKG-INFO +17 -1
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/README.md +15 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/auth.py +1 -1
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/coreapi.py +26 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/item.py +2 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/workspace.py +2 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/PKG-INFO +17 -1
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/requires.txt +1 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/pyproject.toml +1 -1
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/setup.py +2 -1
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/LICENSE +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/__init__.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/admin_item.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/admin_workspace.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/adminapi.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/capacity.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/client.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/deployment_pipeline.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/domain.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/environment.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/job_instance.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/lakehouse.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/long_running_operation.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/onelakeshortcut.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/otheritems.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/spark_custom_pool.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/util/__init__.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/util/logger.py +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/SOURCES.txt +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
- {msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/setup.cfg +0 -0
@@ -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
|
|
@@ -439,6 +439,21 @@ ws.delete_shortcut(item_id="item_id",
|
|
439
439
|
item.delete_shortcut(path="path",
|
440
440
|
name="name")
|
441
441
|
|
442
|
+
# List shortcuts of an item
|
443
|
+
|
444
|
+
fc.list_shortcuts(workspace_id="workspace_id",
|
445
|
+
item_id="item_id",
|
446
|
+
# optional parent_path="Tables"
|
447
|
+
)
|
448
|
+
|
449
|
+
# or
|
450
|
+
ws.list_shortcuts(item_id="item_id",
|
451
|
+
# optional parent_path="Tables"
|
452
|
+
)
|
453
|
+
|
454
|
+
# or
|
455
|
+
item.list_shortcuts(parent_path="Tables")
|
456
|
+
|
442
457
|
```
|
443
458
|
|
444
459
|
|
@@ -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")
|
@@ -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:
|
@@ -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
|
|
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/deployment_pipeline.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_capacity.py
RENAMED
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/long_running_operation.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/dependency_links.txt
RENAMED
File without changes
|
{msfabricpysdkcore-0.1.6 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|