semantic-link-labs 0.8.6__py3-none-any.whl → 0.8.7__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.

Potentially problematic release.


This version of semantic-link-labs might be problematic. Click here for more details.

Files changed (34) hide show
  1. {semantic_link_labs-0.8.6.dist-info → semantic_link_labs-0.8.7.dist-info}/METADATA +14 -6
  2. {semantic_link_labs-0.8.6.dist-info → semantic_link_labs-0.8.7.dist-info}/RECORD +34 -28
  3. {semantic_link_labs-0.8.6.dist-info → semantic_link_labs-0.8.7.dist-info}/WHEEL +1 -1
  4. sempy_labs/__init__.py +37 -6
  5. sempy_labs/_authentication.py +108 -0
  6. sempy_labs/_connections.py +355 -176
  7. sempy_labs/_dataflows.py +0 -1
  8. sempy_labs/_gateways.py +439 -0
  9. sempy_labs/_generate_semantic_model.py +51 -30
  10. sempy_labs/_git.py +13 -5
  11. sempy_labs/_helper_functions.py +14 -3
  12. sempy_labs/_list_functions.py +1 -1
  13. sempy_labs/_model_auto_build.py +4 -2
  14. sempy_labs/_model_bpa.py +2 -15
  15. sempy_labs/_model_bpa_bulk.py +4 -2
  16. sempy_labs/_refresh_semantic_model.py +6 -0
  17. sempy_labs/admin/__init__.py +19 -9
  18. sempy_labs/admin/_basic_functions.py +475 -548
  19. sempy_labs/admin/_external_data_share.py +97 -0
  20. sempy_labs/admin/_git.py +69 -0
  21. sempy_labs/admin/_items.py +264 -0
  22. sempy_labs/admin/_scanner.py +104 -0
  23. sempy_labs/directlake/_dl_helper.py +6 -2
  24. sempy_labs/directlake/_get_shared_expression.py +5 -35
  25. sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py +3 -2
  26. sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py +4 -2
  27. sempy_labs/report/_generate_report.py +10 -4
  28. sempy_labs/report/_report_bpa.py +1 -0
  29. sempy_labs/report/_report_helper.py +58 -0
  30. sempy_labs/report/_report_list_functions.py +2 -0
  31. sempy_labs/report/_reportwrapper.py +358 -175
  32. sempy_labs/tom/_model.py +1 -0
  33. {semantic_link_labs-0.8.6.dist-info → semantic_link_labs-0.8.7.dist-info}/LICENSE +0 -0
  34. {semantic_link_labs-0.8.6.dist-info → semantic_link_labs-0.8.7.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: semantic-link-labs
3
- Version: 0.8.6
3
+ Version: 0.8.7
4
4
  Summary: Semantic Link Labs for Microsoft Fabric
5
5
  Author: Microsoft Corporation
6
6
  License: MIT License
@@ -15,19 +15,19 @@ Classifier: Framework :: Jupyter
15
15
  Requires-Python: <3.12,>=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: semantic-link-sempy >=0.8.3
18
+ Requires-Dist: semantic-link-sempy>=0.8.3
19
19
  Requires-Dist: anytree
20
20
  Requires-Dist: powerbiclient
21
21
  Requires-Dist: polib
22
22
  Requires-Dist: azure.mgmt.resource
23
- Requires-Dist: jsonpath-ng
23
+ Requires-Dist: jsonpath_ng
24
24
  Provides-Extra: test
25
- Requires-Dist: pytest >=8.2.1 ; extra == 'test'
25
+ Requires-Dist: pytest>=8.2.1; extra == "test"
26
26
 
27
27
  # Semantic Link Labs
28
28
 
29
29
  [![PyPI version](https://badge.fury.io/py/semantic-link-labs.svg)](https://badge.fury.io/py/semantic-link-labs)
30
- [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.8.6&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
30
+ [![Read The Docs](https://readthedocs.org/projects/semantic-link-labs/badge/?version=0.8.7&style=flat)](https://readthedocs.org/projects/semantic-link-labs/)
31
31
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
32
32
  [![Downloads](https://static.pepy.tech/badge/semantic-link-labs)](https://pepy.tech/project/semantic-link-labs)
33
33
 
@@ -60,6 +60,10 @@ Check out the video below for an introduction to Semantic Link, Semantic Link La
60
60
  * [Warm the cache of a Direct Lake semantic model after a refresh (using columns currently in memory)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.directlake.html#sempy_labs.directlake.warm_direct_lake_cache_isresident)
61
61
  * [Warm the cache of a Direct Lake semantic model (via perspective)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.directlake.html#sempy_labs.directlake.warm_direct_lake_cache_perspective)
62
62
  * [Visualize a refresh](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Semantic%20Model%20Refresh.ipynb)
63
+ * [Update the connection of a Direct Lake semantic model](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.directlake.html#sempy_labs.directlake.update_direct_lake_model_connection)
64
+ * [Dynamically generate a Direct Lake semantic model](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.directlake.html#sempy_labs.directlake.generate_direct_lake_semantic_model)
65
+ * [Check why a Direct Lake semantic model would fallback to DirectQuery](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.directlake.html#sempy_labs.directlake.check_fallback_reason)
66
+ * [View a measure dependency tree](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.measure_dependency_tree)
63
67
  * Reports
64
68
  * [Report Best Practice Analyzer (BPA)](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.report.html#sempy_labs.report.run_report_bpa)
65
69
  * [View report metadata](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Report%20Analysis.ipynb)
@@ -71,10 +75,13 @@ Check out the video below for an introduction to Semantic Link, Semantic Link La
71
75
  * Capacities
72
76
  * [Migrating a Power BI Premium capacity (P sku) to a Fabric capacity (F sku)](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Capacity%20Migration.ipynb)
73
77
  * [Migrating a Fabric Trial capacity (FT sku) to a Fabric capacity (F sku)](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Capacity%20Migration.ipynb)
74
- * [Create](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.create_fabric_capacity)/[update](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.update_fabric_capacity)/[suspend](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.suspend_fabric_capacity)/[resume](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.resume_fabric_capacity) Fabric capacities.
78
+ * [Create](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.create_fabric_capacity)/[update](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.update_fabric_capacity)/[suspend](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.suspend_fabric_capacity)/[resume](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.resume_fabric_capacity) Fabric capacities
75
79
  * Lakehouses
76
80
  * [Optimize lakehouse tables](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.lakehouse.html#sempy_labs.lakehouse.optimize_lakehouse_tables)
77
81
  * [Vacuum lakehouse tables](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.lakehouse.html#sempy_labs.lakehouse.vacuum_lakehouse_tables)
82
+ * [Create](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.lakehouse.html#sempy_labs.lakehouse.create_shortcut_onelake), [delete](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.lakehouse.html#sempy_labs.lakehouse.delete_shortcut), and [view shortcuts](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.list_shortcuts)
83
+ * Notebooks
84
+ * [Import a notebook from the web](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.import_notebook_from_web)
78
85
  * APIs
79
86
  * Wrapper functions for [Power BI](https://learn.microsoft.com/rest/api/power-bi/), [Fabric](https://learn.microsoft.com/rest/api/fabric/articles/using-fabric-apis), and [Azure (Fabric Capacity)](https://learn.microsoft.com/rest/api/microsoftfabric/fabric-capacities?view=rest-microsoftfabric-2023-11-01) APIs
80
87
 
@@ -134,6 +141,7 @@ An even better way to ensure the semantic-link-labs library is available in your
134
141
  2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
135
142
 
136
143
  ## Version History
144
+ * [0.8.7](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.7) (November 27, 2024)
137
145
  * [0.8.6](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.6) (November 14, 2024)
138
146
  * [0.8.5](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.5) (November 13, 2024)
139
147
  * [0.8.4](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.4) (October 30, 2024)
@@ -1,11 +1,12 @@
1
- sempy_labs/__init__.py,sha256=m-MEq0ztOEFilCXIMz6NhseGu9WqqxFZPUz6wl26L_c,11920
1
+ sempy_labs/__init__.py,sha256=YFVryT8HOZZ-A8gRG7A5f_R0TtQmtUoEJk0ZeoNSNJQ,12780
2
2
  sempy_labs/_ai.py,sha256=CzsNw6Wpd2B5Rd0RcY250-_p0L-0gFoMNLEc_KmrobU,16177
3
+ sempy_labs/_authentication.py,sha256=LWkl0yoz63tYe5u9DL1js7g88vmkVbcTIqrsaxDHMT0,3851
3
4
  sempy_labs/_capacities.py,sha256=HWX1ivlWpyS7Ea_ny-39kUAQYFGMzo42kWMGdJMINos,25466
4
5
  sempy_labs/_capacity_migration.py,sha256=PCIodWXas9v7q93hqD2m8EanJHPJzke52jbCWOfnLZk,27764
5
6
  sempy_labs/_clear_cache.py,sha256=ttHsXXR6SRRw4eC0cS8I5h38UbWU9YJii1y-uR9R3KM,12493
6
- sempy_labs/_connections.py,sha256=w1NeC9auc07ko2pY3m5vM_9-sgW_chw1OxPzDviVC5k,12179
7
+ sempy_labs/_connections.py,sha256=ZG8Ozy6MJH2b_oHnfZyjDuLDj7nTHHo5ulI-Vvw1epo,17648
7
8
  sempy_labs/_data_pipelines.py,sha256=WdZjTELNuN_7suWj6NrZUxGnMTzAgIxFw8V6YMb8ags,5644
8
- sempy_labs/_dataflows.py,sha256=h_iYfNQTkNR7iGPQMO47s5eVR3CrpL04pN50xQl63ac,8253
9
+ sempy_labs/_dataflows.py,sha256=Wpx5jmTDewTkL2bsVZ5r_PTD0etIBdKXVigTjUF8HAg,8252
9
10
  sempy_labs/_dax.py,sha256=oYNwMaHusxoqQmfi_S6iF2X5o29dCM7cb2eIiLpFlas,8605
10
11
  sempy_labs/_deployment_pipelines.py,sha256=WBBQM85-3-MkXb5OmRPF6U83xLyhKSlYUyhRlkvcl4k,6027
11
12
  sempy_labs/_documentation.py,sha256=yVA8VPEzx_fmljtcvSxtB7-BeupYsfdMXXjp6Fpnyo8,5007
@@ -13,27 +14,28 @@ sempy_labs/_environments.py,sha256=avpLSfZyyQFdEDIIxWv2THLjPZwbs9XGXT7ob9l_-ao,5
13
14
  sempy_labs/_eventhouses.py,sha256=vgIFQkXcBPC4SnlrBzT7SRmembExxkm6n0gdKnc7Hlk,4036
14
15
  sempy_labs/_eventstreams.py,sha256=Rht0eWoZbYF6XKtE3AOUvGgA21smxC9gdN599z-jY3s,4061
15
16
  sempy_labs/_external_data_shares.py,sha256=lUsKy1mexNSmhyFwxSeE2jZKNdDAWDP6iC6UPTXCvyU,6799
16
- sempy_labs/_generate_semantic_model.py,sha256=ktyPjP0BxE-keQm_VB9siOEGcmKc4_EZRlIKopJFeOM,14476
17
- sempy_labs/_git.py,sha256=LrerJoooP9z5uUPR_nKyLHxxuZQWguSale8Tuo9SF_M,13163
18
- sempy_labs/_helper_functions.py,sha256=zOctuWIPfUunBRGmAQ0W-lyQgliEJtpsg0D8pqYTo-4,37788
17
+ sempy_labs/_gateways.py,sha256=CzTS95tLpG1bIG-0XkJWniNQEyNUtRq2go4QJAvjMr4,14617
18
+ sempy_labs/_generate_semantic_model.py,sha256=au4amuYc35n0lyNAz3dYkJAfHfd2nkRpBybVY2ZQI90,15212
19
+ sempy_labs/_git.py,sha256=C9TYKG4g8q35R1S7iTZyjMtRis033uUWkYJe_a0f3u0,13540
20
+ sempy_labs/_helper_functions.py,sha256=Dk1cYfctxn_0RJHRKuqelcpaNJxyhoBZwWbvb0CGumU,38051
19
21
  sempy_labs/_icons.py,sha256=ez2dx_LCti71S_-eB6WYQ-kOMyiBL8ZJN12-ev5dcmA,3579
20
22
  sempy_labs/_kql_databases.py,sha256=oNX9oKnXu5SLkzl4kTMQguh4In-i-0Forcoy1phOe1s,4621
21
23
  sempy_labs/_kql_querysets.py,sha256=A-79LiLBKxlADPTuSK9ipy_LjXKcsJZwQHknUXFpVl0,4157
22
- sempy_labs/_list_functions.py,sha256=5bjRee8aAhW-ddSQNDmwOdQwWTrDSBR1uRZjt1wQLQ4,55426
24
+ sempy_labs/_list_functions.py,sha256=6EKlqwqT0tru1uV7qXCew5lMKgJrGqEnOHu_3q-z7RM,55503
23
25
  sempy_labs/_managed_private_endpoints.py,sha256=bCuC9V4yMFBw1BNlsoxARdIEMPAySW-ljHrhvuziQfw,6179
24
26
  sempy_labs/_mirrored_databases.py,sha256=5_5phu50KIvhHNQJ-RQAxd92W4D7GUVMyjAnOb7ZY3Q,14360
25
27
  sempy_labs/_mirrored_warehouses.py,sha256=t2fBH5L0UzNahDB4lATDLvmCqYTU-V93_ZVLb5ZISSg,1764
26
28
  sempy_labs/_ml_experiments.py,sha256=UVh3cwNvpY-otCBIaKW-sgtzyjwAuu8qJDLhZGBHToE,4196
27
29
  sempy_labs/_ml_models.py,sha256=phYLySjN7MO2YYfq7ZQKMS6w18G6L1-7DdNWB4fcLjQ,4044
28
- sempy_labs/_model_auto_build.py,sha256=-qDwmFx3KMuIaaUU8CzmCX7CF7ZUVWWu-_GH2UhAU_8,5045
29
- sempy_labs/_model_bpa.py,sha256=So6-33PiogMBXwtt_drPsBDNVBp7rXJm-caADuXKseE,22268
30
- sempy_labs/_model_bpa_bulk.py,sha256=NDNdPPj6wkk4jvWzhdl61MAlAK9_GsdK0juvC9-LgmY,15956
30
+ sempy_labs/_model_auto_build.py,sha256=PTQo3dufzLSFcQ5shFkmBWAVSdP7cTJgpUclrcXyNbg,5105
31
+ sempy_labs/_model_bpa.py,sha256=Tyj7JV4L0rCmeWL896S58SOA8SHQKNxQ9QnmqunKTfM,21764
32
+ sempy_labs/_model_bpa_bulk.py,sha256=WoJhN_A0X3qkaI624NS0PTq7r8x9uSdFtQEnOmiV7Dc,16003
31
33
  sempy_labs/_model_bpa_rules.py,sha256=96_GkXQGhON-_uyUATgUibk4W9y7e9wl1QciUr96gIQ,45544
32
34
  sempy_labs/_model_dependencies.py,sha256=D_I3nwBMJ8YaxVz4x-W3P5qHjtukYdjH_FSFrvhsE94,11676
33
35
  sempy_labs/_notebooks.py,sha256=EUYVeRJrCL9IllQevwRxzkCUU-rzX6KEEH7x7mBYUqc,7422
34
36
  sempy_labs/_one_lake_integration.py,sha256=eIuLxlw8eXfUH2avKhsyLmXZbTllSwGsz2j_HMAikpQ,6234
35
37
  sempy_labs/_query_scale_out.py,sha256=xoHnuDUgPYsg-NlUplB9ieb0bClcBQeG4veJNo_4TNw,15708
36
- sempy_labs/_refresh_semantic_model.py,sha256=SnakEoE04yVvihK4NW3Kx4csWMuYCZfp9oFM7-KNgVU,16795
38
+ sempy_labs/_refresh_semantic_model.py,sha256=R781zVHTnoLw5mzzcSc39OPBmKpzoBxsOa1KhvqyEgw,17131
37
39
  sempy_labs/_spark.py,sha256=RIJt9b_l5Sp5XrebhvRD0DEBKDTQdA8Rh7fByV27ngQ,20109
38
40
  sempy_labs/_sql.py,sha256=KttKi95iGxTT8UA1QOpT9ygAdwCfHHlcQSQ5d9gml0E,5358
39
41
  sempy_labs/_translations.py,sha256=2DpP--U3d8Gp7o9LF-OnZa10onN2unvqSHVQHv3CBZg,19838
@@ -80,20 +82,24 @@ sempy_labs/_bpa_translation/_model/_translations_tr-TR.po,sha256=NdW-X4E0QmeLKM0
80
82
  sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=3NsFN8hoor_5L6738FjpJ8o4spwp8FNFGbVItHD-_ec,43500
81
83
  sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=ipMbnet7ZI5mZoC8KonYKVwGmFLHFB_9KIDOoBgSNfo,26815
82
84
  sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=5v6tVKGruqneAeMoa6F3tyg_JBL8qOpqOJofWpq2W3U,31518
83
- sempy_labs/admin/__init__.py,sha256=4TdPPh5SW3cBrtZXnTsiFQnOir5nwP5oU4kX9m5vINA,1561
84
- sempy_labs/admin/_basic_functions.py,sha256=ITCDRd45ygorwj74rZr5WoV6-6-OeCJ9Jejp6UMr6uY,37181
85
+ sempy_labs/admin/__init__.py,sha256=mWwIKFM2mTEMh4A7hhr27fnNSASrZ-4p5PzpCHn1FQY,1785
86
+ sempy_labs/admin/_basic_functions.py,sha256=W21ZUjIMKG2FLCbh9QliT46E3R_SPRQmNljByAIZ7LY,33949
85
87
  sempy_labs/admin/_domains.py,sha256=tVjUiV4bLdVKl665ouYGfzYPFsRhPwYHYy7efCncvsE,12337
88
+ sempy_labs/admin/_external_data_share.py,sha256=ITsPDgRDfgvZn1cjzpUWyR6lpnoOP0-gJVxjRA3Mp8w,3489
89
+ sempy_labs/admin/_git.py,sha256=OY2F5ICKBXrB1HhlYDWdXQPnhTwSrMfWzEa2xcutClc,2181
90
+ sempy_labs/admin/_items.py,sha256=LqjBYWL3NZCX8f0H-zzjOzy9zlBC7XR4LiknJv_JLT0,8428
91
+ sempy_labs/admin/_scanner.py,sha256=GjBJUQg5qoeF492MkEaJOY_vIB7guFXv6YL7WFoPQy0,4500
86
92
  sempy_labs/directlake/__init__.py,sha256=etaj-3wqe5t93mu74tGYjEOQ6gtHWUogidOygiVvlq8,2131
87
93
  sempy_labs/directlake/_directlake_schema_compare.py,sha256=ocHFU6E6HSKgcNLywGM0dx0ie9AXYwk-E7o7EYcqiN4,4422
88
94
  sempy_labs/directlake/_directlake_schema_sync.py,sha256=fhh6Xjd42HjI5x_Ejwq1N4qqnXQsKpXmyPcYl7cNG6A,4151
89
- sempy_labs/directlake/_dl_helper.py,sha256=76i3yr9fqohHIZwrAeooWVCxrTyVzi5Hu6YlFjFms5E,9321
95
+ sempy_labs/directlake/_dl_helper.py,sha256=lnvq99QCtxba0ViAEfL_fjhvlV1QMU-xDF0cU9s6ih4,9413
90
96
  sempy_labs/directlake/_generate_shared_expression.py,sha256=EauK1M4fabCZjsHYAWxEYaVJKqxJ99nZQaN2pKdd1lg,3077
91
97
  sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=sovI4ds2SEgkp4Fi465jtJ4seRvQxdYgcixRDvsUwNM,2321
92
- sempy_labs/directlake/_get_shared_expression.py,sha256=js7qryOyNZT0m-aGywGFq5AufQGeRIwfxYHJnc70oaw,2070
98
+ sempy_labs/directlake/_get_shared_expression.py,sha256=rJ2twFSAMpjdjXl4zkqei_qxzxmGn5DxiDW2KxLcUog,1081
93
99
  sempy_labs/directlake/_guardrails.py,sha256=elPIrqBy7gX7ZhVC7dBqhuFohET9QX9cCX1Harwrw3A,2525
94
100
  sempy_labs/directlake/_list_directlake_model_calc_tables.py,sha256=_rpnbgsFAz2W16PpgIOB0Rj_Fs1ZKrDbz3DUaaR_bfU,2143
95
101
  sempy_labs/directlake/_show_unsupported_directlake_objects.py,sha256=xm6bih0mbYfWP6ca8BKMZobfS4hhcHNFIhR5I6sNpgw,3181
96
- sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=X-eNLMhAftsdfs9OOqRcB3tM5X8j9zrN1JqYXpntc2U,5843
102
+ sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=CyluSlo4VVnjl5bEzSLkkhvwDs3YnzSil2lphtlS_KE,5826
97
103
  sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=Z67WolTLIrflLFBvRuhmE_MxYGhSBQCFvjqojz6yavw,7614
98
104
  sempy_labs/directlake/_warm_cache.py,sha256=b7XvH74nQrEoraOflrXs4-fVuiLtRrmsQI35TBnYEqs,8307
99
105
  sempy_labs/lakehouse/__init__.py,sha256=6LVQltQ3cjyiuxvjXTuNdJ163zSqi4h_tEZY4zsxuSw,647
@@ -106,21 +112,21 @@ sempy_labs/migration/_create_pqt_file.py,sha256=oJJrHfwkq32p_UKBFi0LccjaVI5j4CbR
106
112
  sempy_labs/migration/_migrate_calctables_to_lakehouse.py,sha256=5fSZHylS8yLmk7maYDsvKbOqB9unxT4sQZq5HxBZwQY,17969
107
113
  sempy_labs/migration/_migrate_calctables_to_semantic_model.py,sha256=yNSx126ru7-mUXI3iISwmw8a5jRCwcWw4l5eMXldrcU,6253
108
114
  sempy_labs/migration/_migrate_model_objects_to_semantic_model.py,sha256=8IN45AKxic3_4yrC-N5rqWMzO6bCLF9qoyWxbxrvBHc,22900
109
- sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=6B50BkJW70p0ZdmXKAQsPVsaJUt7_5Ez_KP3iyaBcg4,7046
115
+ sempy_labs/migration/_migrate_tables_columns_to_semantic_model.py,sha256=EiWWaIkNqBGlRKG64lo7gKO31XBuwym_IVvG405PzvM,7118
110
116
  sempy_labs/migration/_migration_validation.py,sha256=pl5Yv4BwRHZfAL0p2soj_Gk8FL3UcwiqKbX23pJe1oQ,2788
111
117
  sempy_labs/migration/_refresh_calc_tables.py,sha256=gUFssZ5vyN4OmViLYkBNkLmYscvQTk8RBZ-i_lrCJYU,5239
112
118
  sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
113
119
  sempy_labs/report/__init__.py,sha256=esE_i1lL2AdcwWs7cE8AKSXZy_7w_4jJJtFULFkDPcU,1244
114
120
  sempy_labs/report/_download_report.py,sha256=C3jsUJ59L5iv8H9NJWVlIuMUrr66VCnVG4xJJ-hACXs,2772
115
- sempy_labs/report/_generate_report.py,sha256=7MbGqXXRS4l76v3rAZgBMMU4j3QEFM9Lxz8ko5yjEcE,12560
121
+ sempy_labs/report/_generate_report.py,sha256=0Tp8ILRjmKj_EvQZkeyr9Wu81X8CgkAMOgLN3WdhAxQ,12773
116
122
  sempy_labs/report/_paginated.py,sha256=-u0vV6byPOBWUOmeBtjPCTmarymucoRv_DvXA54FIHY,2281
117
- sempy_labs/report/_report_bpa.py,sha256=pvj6BdSALuMTB-nl9L-TOKaTXqBpIr3CqkJhdXd0YSQ,13570
123
+ sempy_labs/report/_report_bpa.py,sha256=b1rnp-kCjdWAs1YMJDO_wo665v9BYT38PBDjEQcFmlQ,13697
118
124
  sempy_labs/report/_report_bpa_rules.py,sha256=tPVGA0hmE6QMLlWtig7Va7Ksr2yXWl_Lndq--tWWd6w,4959
119
125
  sempy_labs/report/_report_functions.py,sha256=nKqsVsjGrv8TUXsBXpb5ejEopAaFELc7YzhGerJUTBI,30099
120
- sempy_labs/report/_report_helper.py,sha256=fkSo5m3_KlAlo-fu8FTnxINigWbZI66ex-r44WalKsw,8711
121
- sempy_labs/report/_report_list_functions.py,sha256=4k-bPEi4uW_ozHTZNc_67idP1LQZPT-gO9ToRCv06fk,3127
126
+ sempy_labs/report/_report_helper.py,sha256=pKIsca-XWaioQd97FgbEfsGPWy4X_NxSyYm22W3C23E,10461
127
+ sempy_labs/report/_report_list_functions.py,sha256=Y0fkoo1gGoVDnihveKruNXFgPJNSiEQ5Fus8bw0nqcU,3381
122
128
  sempy_labs/report/_report_rebind.py,sha256=GbOfEb9qz4SdXVGopiWSkGMDKnneJxd7wx4_OWKZ1Js,5188
123
- sempy_labs/report/_reportwrapper.py,sha256=f5nVYKHqUjqoTBLcwZbNlH9YBZlWqadpfkLJYvJ2WNg,75780
129
+ sempy_labs/report/_reportwrapper.py,sha256=LMc-cZP7DbFhLn5EmOdKHFWhaBUZ7u2gY7Sx7GZxxJs,82712
124
130
  sempy_labs/report/_bpareporttemplate/.platform,sha256=kWRa6B_KwSYLsvVFDx372mQriQO8v7dJ_YzQV_cfD-Q,303
125
131
  sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
126
132
  sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json,sha256=kzjBlNdjbsSBBSHBwbQc298AJCr9Vp6Ex0D5PemUuT0,1578
@@ -151,9 +157,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
151
157
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
152
158
  sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
153
159
  sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
154
- sempy_labs/tom/_model.py,sha256=_LEi6Lw7XwQgMGSCSwGL7MFQu5AgyAnMOHkXT-x4pow,172012
155
- semantic_link_labs-0.8.6.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
156
- semantic_link_labs-0.8.6.dist-info/METADATA,sha256=o8z5fU7xNgxxUX3AXeynfrRSu8LN9_nRuMLPV4GJUrE,19339
157
- semantic_link_labs-0.8.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
158
- semantic_link_labs-0.8.6.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
159
- semantic_link_labs-0.8.6.dist-info/RECORD,,
160
+ sempy_labs/tom/_model.py,sha256=ebtKiXIP96BU8cK62OAQZq2PAB2TYM-4pIoOIA73_68,172073
161
+ semantic_link_labs-0.8.7.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
162
+ semantic_link_labs-0.8.7.dist-info/METADATA,sha256=LtMPb9zMWgkkwT0xKKJ2B6dzrlHSnGaWd8gwRlQJcPY,20715
163
+ semantic_link_labs-0.8.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
164
+ semantic_link_labs-0.8.7.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
165
+ semantic_link_labs-0.8.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
sempy_labs/__init__.py CHANGED
@@ -1,3 +1,18 @@
1
+ from sempy_labs._gateways import (
2
+ list_gateway_members,
3
+ list_gateway_role_assigments,
4
+ list_gateways,
5
+ delete_gateway,
6
+ delete_gateway_member,
7
+ delete_gateway_role_assignment,
8
+ create_vnet_gateway,
9
+ update_vnet_gateway,
10
+ update_on_premises_gateway,
11
+ )
12
+
13
+ from sempy_labs._authentication import (
14
+ ServicePrincipalTokenProvider,
15
+ )
1
16
  from sempy_labs._mirrored_databases import (
2
17
  get_mirrored_database_definition,
3
18
  get_mirroring_status,
@@ -156,9 +171,12 @@ from sempy_labs._dataflows import (
156
171
  from sempy_labs._connections import (
157
172
  list_connections,
158
173
  list_item_connections,
159
- # create_connection_cloud,
160
- # create_connection_vnet,
161
- # create_connection_on_prem
174
+ list_connection_role_assignments,
175
+ delete_connection,
176
+ delete_connection_role_assignment,
177
+ create_vnet_connection,
178
+ create_on_prem_connection,
179
+ create_cloud_connection,
162
180
  )
163
181
  from sempy_labs._dax import (
164
182
  evaluate_dax_impersonation,
@@ -267,9 +285,6 @@ __all__ = [
267
285
  "create_azure_storage_account",
268
286
  "delete_custom_pool",
269
287
  "clear_cache",
270
- # create_connection_cloud,
271
- # create_connection_vnet,
272
- # create_connection_on_prem,
273
288
  "evaluate_dax_impersonation",
274
289
  "create_blank_semantic_model",
275
290
  "create_semantic_model_from_bim",
@@ -425,4 +440,20 @@ __all__ = [
425
440
  "update_mirrored_database_definition",
426
441
  "get_tables_mirroring_status",
427
442
  "list_upstream_dataflows",
443
+ "ServicePrincipalTokenProvider",
444
+ "list_connection_role_assignments",
445
+ "delete_connection",
446
+ "delete_connection_role_assignment",
447
+ "create_vnet_connection",
448
+ "create_on_prem_connection",
449
+ "create_cloud_connection",
450
+ "list_gateway_members",
451
+ "list_gateway_role_assigments",
452
+ "list_gateways",
453
+ "delete_gateway",
454
+ "delete_gateway_member",
455
+ "delete_gateway_role_assignment",
456
+ "create_vnet_gateway",
457
+ "update_vnet_gateway",
458
+ "update_on_premises_gateway",
428
459
  ]
@@ -0,0 +1,108 @@
1
+ from typing import Literal
2
+ from sempy.fabric._token_provider import TokenProvider
3
+ from azure.identity import ClientSecretCredential
4
+
5
+
6
+ class ServicePrincipalTokenProvider(TokenProvider):
7
+ """
8
+ Implementation of the sempy.fabric.TokenProvider to be used with Service Principal.
9
+
10
+ For more information on Service Principal see: `Application and service principal objects in Microsoft Entra ID <https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#service-principal-object>`_
11
+ """
12
+
13
+ def __init__(self, credential: ClientSecretCredential):
14
+
15
+ self.credential = credential
16
+
17
+ @classmethod
18
+ def from_aad_application_key_authentication(
19
+ cls, tenant_id: str, client_id: str, client_secret: str
20
+ ):
21
+ """
22
+ Generates the ServicePrincipalTokenProvider, providing the Service Principal information.
23
+
24
+ ***USE THIS ONE ONLY FOR TEST PURPOSE. FOR PRODUCTION WE RECOMMEND CALLING ServicePrincipalTokenProvider.from_azure_key_vault()***
25
+
26
+ Parameters
27
+ ----------
28
+ tenant_id : str
29
+ The Fabric Tenant ID.
30
+ client_id : str
31
+ The Service Principal Application Client ID.
32
+ client_secret : str
33
+ The Service Principal Client Secret.
34
+
35
+ Returns
36
+ -------
37
+ sempy.fabric.TokenProvider
38
+ Token provider to be used with FabricRestClient or PowerBIRestClient.
39
+ """
40
+ credential = ClientSecretCredential(
41
+ tenant_id=tenant_id, client_id=client_id, client_secret=client_secret
42
+ )
43
+
44
+ return cls(credential)
45
+
46
+ @classmethod
47
+ def from_azure_key_vault(
48
+ cls,
49
+ key_vault_uri: str,
50
+ key_vault_tenant_id: str,
51
+ key_vault_client_id: str,
52
+ key_vault_client_secret: str,
53
+ ):
54
+ """
55
+ Generates the ServicePrincipalTokenProvider, providing the Azure Key Vault details.
56
+
57
+ For more information on Azure Key Vault, `click here <https://learn.microsoft.com/en-us/azure/key-vault/general/overview>`_.
58
+
59
+ Parameters
60
+ ----------
61
+ key_vault_uri : str
62
+ Azure Key Vault URI.
63
+ key_vault_tenant_id : str
64
+ Name of the secret in the Key Vault with the Fabric Tenant ID.
65
+ key_vault_client_id : str
66
+ Name of the secret in the Key Vault with the Service Principal Client ID.
67
+ key_vault_client_secret : str
68
+ Name of the secret in the Key Vault with the Service Principal Client Secret.
69
+
70
+ Returns
71
+ -------
72
+ sempy.fabric.TokenProvider
73
+ Token provider to be used with FabricRestClient or PowerBIRestClient.
74
+ """
75
+
76
+ import notebookutils
77
+
78
+ tenant_id = notebookutils.credentials.getSecret(
79
+ key_vault_uri, key_vault_tenant_id
80
+ )
81
+ client_id = notebookutils.credentials.getSecret(
82
+ key_vault_uri, key_vault_client_id
83
+ )
84
+ client_secret = notebookutils.credentials.getSecret(
85
+ key_vault_uri, key_vault_client_secret
86
+ )
87
+
88
+ credential = ClientSecretCredential(
89
+ tenant_id=tenant_id, client_id=client_id, client_secret=client_secret
90
+ )
91
+
92
+ return cls(credential)
93
+
94
+ def __call__(self, audience: Literal["pbi", "storage"] = "pbi") -> str:
95
+ """
96
+ Parameters
97
+ ----------
98
+ audience : Literal["pbi", "storage"] = "pbi") -> str
99
+ Literal if it's for PBI/Fabric API call or OneLake/Storage Account call.
100
+ """
101
+ if audience == "pbi":
102
+ return self.credential.get_token(
103
+ "https://analysis.windows.net/powerbi/api/.default"
104
+ ).token
105
+ elif audience == "storage":
106
+ return self.credential.get_token("https://storage.azure.com/.default").token
107
+ else:
108
+ raise NotImplementedError