msfabricpysdkcore 0.1.7__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.
Files changed (34) hide show
  1. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/PKG-INFO +16 -1
  2. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/README.md +15 -0
  3. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/coreapi.py +26 -0
  4. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/item.py +2 -0
  5. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/workspace.py +2 -0
  6. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/PKG-INFO +16 -1
  7. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/pyproject.toml +1 -1
  8. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/setup.py +1 -1
  9. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/LICENSE +0 -0
  10. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/__init__.py +0 -0
  11. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/admin_item.py +0 -0
  12. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/admin_workspace.py +0 -0
  13. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/adminapi.py +0 -0
  14. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/auth.py +0 -0
  15. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/capacity.py +0 -0
  16. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/client.py +0 -0
  17. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/deployment_pipeline.py +0 -0
  18. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/domain.py +0 -0
  19. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/environment.py +0 -0
  20. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
  21. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/fabric_azure_client.py +0 -0
  22. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/job_instance.py +0 -0
  23. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/lakehouse.py +0 -0
  24. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/long_running_operation.py +0 -0
  25. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/onelakeshortcut.py +0 -0
  26. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/otheritems.py +0 -0
  27. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/spark_custom_pool.py +0 -0
  28. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/util/__init__.py +0 -0
  29. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore/util/logger.py +0 -0
  30. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/SOURCES.txt +0 -0
  31. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
  32. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/requires.txt +0 -0
  33. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.1.8}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
  34. {msfabricpysdkcore-0.1.7 → 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.7
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
@@ -455,6 +455,21 @@ ws.delete_shortcut(item_id="item_id",
455
455
  item.delete_shortcut(path="path",
456
456
  name="name")
457
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
+
458
473
  ```
459
474
 
460
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
 
@@ -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.7
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
@@ -455,6 +455,21 @@ ws.delete_shortcut(item_id="item_id",
455
455
  item.delete_shortcut(path="path",
456
456
  name="name")
457
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
+
458
473
  ```
459
474
 
460
475
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "msfabricpysdkcore"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  dynamic = ["dependencies"]
9
9
  authors = [
10
10
  { name="Andreas Rederer"},
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='msfabricpysdkcore',
5
- version='1.7',
5
+ version='1.8',
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  'requests>=2.30.0',