semantic-link-labs 0.11.3__py3-none-any.whl → 0.12.0__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.
- {semantic_link_labs-0.11.3.dist-info → semantic_link_labs-0.12.0.dist-info}/METADATA +5 -4
- {semantic_link_labs-0.11.3.dist-info → semantic_link_labs-0.12.0.dist-info}/RECORD +77 -73
- sempy_labs/__init__.py +6 -0
- sempy_labs/_a_lib_info.py +1 -1
- sempy_labs/_authentication.py +81 -32
- sempy_labs/_capacities.py +2 -2
- sempy_labs/_capacity_migration.py +4 -4
- sempy_labs/_clear_cache.py +1 -1
- sempy_labs/_connections.py +107 -70
- sempy_labs/_dashboards.py +6 -2
- sempy_labs/_data_pipelines.py +1 -1
- sempy_labs/_dataflows.py +1 -1
- sempy_labs/_dax.py +3 -3
- sempy_labs/_delta_analyzer.py +4 -4
- sempy_labs/_delta_analyzer_history.py +1 -1
- sempy_labs/_deployment_pipelines.py +1 -1
- sempy_labs/_environments.py +1 -1
- sempy_labs/_eventhouses.py +9 -3
- sempy_labs/_eventstreams.py +1 -1
- sempy_labs/_external_data_shares.py +1 -1
- sempy_labs/_gateways.py +14 -7
- sempy_labs/_generate_semantic_model.py +7 -12
- sempy_labs/_git.py +1 -1
- sempy_labs/_graphQL.py +1 -1
- sempy_labs/_helper_functions.py +161 -54
- sempy_labs/_job_scheduler.py +12 -1
- sempy_labs/_kql_databases.py +1 -1
- sempy_labs/_kql_querysets.py +10 -2
- sempy_labs/_kusto.py +2 -2
- sempy_labs/_list_functions.py +1 -1
- sempy_labs/_managed_private_endpoints.py +1 -1
- sempy_labs/_mirrored_databases.py +40 -16
- sempy_labs/_mirrored_warehouses.py +1 -1
- sempy_labs/_ml_experiments.py +1 -1
- sempy_labs/_model_bpa.py +6 -6
- sempy_labs/_model_bpa_bulk.py +3 -3
- sempy_labs/_model_dependencies.py +1 -1
- sempy_labs/_mounted_data_factories.py +3 -3
- sempy_labs/_notebooks.py +2 -1
- sempy_labs/_query_scale_out.py +2 -2
- sempy_labs/_refresh_semantic_model.py +1 -1
- sempy_labs/_semantic_models.py +15 -3
- sempy_labs/_spark.py +1 -1
- sempy_labs/_sql.py +3 -3
- sempy_labs/_sql_endpoints.py +5 -3
- sempy_labs/_sqldatabase.py +5 -1
- sempy_labs/_tags.py +3 -1
- sempy_labs/_translations.py +7 -360
- sempy_labs/_user_delegation_key.py +2 -2
- sempy_labs/_utils.py +27 -0
- sempy_labs/_vertipaq.py +3 -3
- sempy_labs/_vpax.py +1 -1
- sempy_labs/_warehouses.py +5 -0
- sempy_labs/_workloads.py +1 -1
- sempy_labs/_workspace_identity.py +1 -1
- sempy_labs/_workspaces.py +145 -11
- sempy_labs/admin/__init__.py +6 -0
- sempy_labs/admin/_capacities.py +34 -11
- sempy_labs/admin/_items.py +2 -2
- sempy_labs/admin/_tenant_keys.py +89 -0
- sempy_labs/directlake/_dl_helper.py +1 -1
- sempy_labs/lakehouse/__init__.py +4 -0
- sempy_labs/lakehouse/_materialized_lake_views.py +76 -0
- sempy_labs/lakehouse/_shortcuts.py +8 -2
- sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json +9 -0
- sempy_labs/report/_bpareporttemplate/.platform +11 -0
- sempy_labs/report/_download_report.py +4 -1
- sempy_labs/report/_export_report.py +12 -5
- sempy_labs/report/_generate_report.py +11 -3
- sempy_labs/report/_paginated.py +21 -15
- sempy_labs/report/_report_functions.py +19 -11
- sempy_labs/report/_report_rebind.py +21 -10
- sempy_labs/theme/_org_themes.py +5 -6
- sempy_labs/tom/_model.py +5 -16
- {semantic_link_labs-0.11.3.dist-info → semantic_link_labs-0.12.0.dist-info}/WHEEL +0 -0
- {semantic_link_labs-0.11.3.dist-info → semantic_link_labs-0.12.0.dist-info}/licenses/LICENSE +0 -0
- {semantic_link_labs-0.11.3.dist-info → semantic_link_labs-0.12.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: semantic-link-labs
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: Semantic Link Labs for Microsoft Fabric
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License: MIT License
|
|
@@ -15,7 +15,7 @@ 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.
|
|
18
|
+
Requires-Dist: semantic-link-sempy>=0.12.0
|
|
19
19
|
Requires-Dist: anytree
|
|
20
20
|
Requires-Dist: polib
|
|
21
21
|
Requires-Dist: jsonpath_ng
|
|
@@ -26,7 +26,7 @@ Dynamic: license-file
|
|
|
26
26
|
# Semantic Link Labs
|
|
27
27
|
|
|
28
28
|
[](https://badge.fury.io/py/semantic-link-labs)
|
|
29
|
-
[](https://readthedocs.org/projects/semantic-link-labs/)
|
|
30
30
|
[](https://github.com/psf/black)
|
|
31
31
|
[](https://pepy.tech/project/semantic-link-labs)
|
|
32
32
|
|
|
@@ -154,6 +154,7 @@ An even better way to ensure the semantic-link-labs library is available in your
|
|
|
154
154
|
2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
|
|
155
155
|
|
|
156
156
|
## Version History
|
|
157
|
+
* [0.12.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.12.0) (September 2, 2025)
|
|
157
158
|
* [0.11.3](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.3) (August 6, 2025)
|
|
158
159
|
* [0.11.2](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.2) (July 8, 2025)
|
|
159
160
|
* [0.11.1](https://github.com/microsoft/semantic-link-labs/releases/tag/0.11.1) (June 24, 2025)
|
|
@@ -213,7 +214,7 @@ Check out my [blog post](https://www.elegantbi.com/post/direct-lake-migration) o
|
|
|
213
214
|
### Instructions
|
|
214
215
|
|
|
215
216
|
1. Download this [notebook](https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Migration%20to%20Direct%20Lake.ipynb).
|
|
216
|
-
2. Make sure you are in the
|
|
217
|
+
2. Make sure you are in the 'Fabric Developer' experience. Click the icon at the bottom left corner of your Workspace screen and select 'Fabric'.
|
|
217
218
|
3. In your workspace, select 'New -> Import notebook' and import the notebook from step 1.
|
|
218
219
|
4. [Add your lakehouse](https://learn.microsoft.com/fabric/data-engineering/lakehouse-notebook-explore#add-or-remove-a-lakehouse) to your Fabric notebook
|
|
219
220
|
5. Follow the instructions within the notebook.
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
semantic_link_labs-0.
|
|
2
|
-
sempy_labs/__init__.py,sha256=
|
|
3
|
-
sempy_labs/_a_lib_info.py,sha256=
|
|
1
|
+
semantic_link_labs-0.12.0.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
2
|
+
sempy_labs/__init__.py,sha256=XXjFqLjr5HXuCNTE_zs2Goyjk-TXXsiBdz5DeNBPjxs,16188
|
|
3
|
+
sempy_labs/_a_lib_info.py,sha256=NoXoV9JWoeL18kF7o2nTsdaoWyr4c4_MbZs1XbnV0b8,53
|
|
4
4
|
sempy_labs/_ai.py,sha256=fiI3RCadJ2jG15vZIWD9rKVhvmGWoD9uth9-PlSPBNs,16196
|
|
5
|
-
sempy_labs/_authentication.py,sha256=
|
|
6
|
-
sempy_labs/_capacities.py,sha256=
|
|
7
|
-
sempy_labs/_capacity_migration.py,sha256=
|
|
8
|
-
sempy_labs/_clear_cache.py,sha256=
|
|
9
|
-
sempy_labs/_connections.py,sha256=
|
|
10
|
-
sempy_labs/_dashboards.py,sha256=
|
|
11
|
-
sempy_labs/_data_pipelines.py,sha256=
|
|
12
|
-
sempy_labs/_dataflows.py,sha256=
|
|
13
|
-
sempy_labs/_dax.py,sha256=
|
|
5
|
+
sempy_labs/_authentication.py,sha256=gW5QNHbzSrvJIrD_0nAH0HkHClc9bAvnnJFO6atecKc,8448
|
|
6
|
+
sempy_labs/_capacities.py,sha256=TQYlbM0LP21G-KsW6QrJ7heBzKL42XxA939VldWiKeg,40436
|
|
7
|
+
sempy_labs/_capacity_migration.py,sha256=g675DY2YgsVA_ffb_8WNdARVMyHh8iu2P94QWLllmDY,24827
|
|
8
|
+
sempy_labs/_clear_cache.py,sha256=UY_pljGeqb168Qe5sP66ecLeREPN4NMpjIEocCmxg0M,13201
|
|
9
|
+
sempy_labs/_connections.py,sha256=deIovVV2JOx4QW-4-A_V9O6l-FJPh3JWTGmIXZ_YH2M,19821
|
|
10
|
+
sempy_labs/_dashboards.py,sha256=1Cpllydezqf8INt31lAVfYcEOZmrqiBPiSzh7GQDWog,2161
|
|
11
|
+
sempy_labs/_data_pipelines.py,sha256=F-VNPVtCQbM_FZsJqZap7vfJSkv7Ta1V28RAOjGfrrk,4871
|
|
12
|
+
sempy_labs/_dataflows.py,sha256=9wu1QOPuNQLe7RrscjnmnrOQ4fe8gyMYyiOtMVZlnCI,20378
|
|
13
|
+
sempy_labs/_dax.py,sha256=Q_GylKeuHFnRB_sztZS1ON5v5tr6ua6lc9elyJYKbV8,17219
|
|
14
14
|
sempy_labs/_daxformatter.py,sha256=A2jTg9kSAye_LuIsCYmaYq5EbInAMfbDylHrERGB3Cs,3037
|
|
15
|
-
sempy_labs/_delta_analyzer.py,sha256=
|
|
16
|
-
sempy_labs/_delta_analyzer_history.py,sha256=
|
|
17
|
-
sempy_labs/_deployment_pipelines.py,sha256=
|
|
15
|
+
sempy_labs/_delta_analyzer.py,sha256=d6qxZrEhn3Hfg5qMQODt7dDG5mYSY18xeXUkW_NyMgw,17281
|
|
16
|
+
sempy_labs/_delta_analyzer_history.py,sha256=9v627Ubxbz4Dn2IAASUNu_sww9V3scoWgGk3yAWJIr0,10893
|
|
17
|
+
sempy_labs/_deployment_pipelines.py,sha256=PRTcSeMxmce4kzMjfhryGrD31GFAbFBSxuCkRbbArrM,6303
|
|
18
18
|
sempy_labs/_dictionary_diffs.py,sha256=DCXuASmt45gshsBO1FgSZDqxm68DnojuDcO-H35EH7Q,9003
|
|
19
19
|
sempy_labs/_documentation.py,sha256=_TzhSYzGBVZYPaHm34T8dtTCbc_t4Mx45EzQKwD048g,5051
|
|
20
|
-
sempy_labs/_environments.py,sha256=
|
|
21
|
-
sempy_labs/_eventhouses.py,sha256=
|
|
22
|
-
sempy_labs/_eventstreams.py,sha256=
|
|
23
|
-
sempy_labs/_external_data_shares.py,sha256=
|
|
24
|
-
sempy_labs/_gateways.py,sha256=
|
|
25
|
-
sempy_labs/_generate_semantic_model.py,sha256=
|
|
26
|
-
sempy_labs/_git.py,sha256=
|
|
27
|
-
sempy_labs/_graphQL.py,sha256=
|
|
28
|
-
sempy_labs/_helper_functions.py,sha256=
|
|
20
|
+
sempy_labs/_environments.py,sha256=uY8CS0FJx1BDTCZmYO7-QDv-ezgfXpSwRrf4OYX2KeI,5984
|
|
21
|
+
sempy_labs/_eventhouses.py,sha256=AJXJ00AOfEaKq0wagZfoLHorztyLHaRx6pkdbunCvFI,5934
|
|
22
|
+
sempy_labs/_eventstreams.py,sha256=XkaUohgAx3v_U7ATWd_TOobphnezxO5nyt_mwF21bPk,3556
|
|
23
|
+
sempy_labs/_external_data_shares.py,sha256=qHirKpBGseQOkg3xHOM5450Wpz3vmWfG3xexYjLQT9M,8945
|
|
24
|
+
sempy_labs/_gateways.py,sha256=Nsb2qSXiAVS0CELhjji4FkKVBdnXhP-6spqqTBZc6sU,18100
|
|
25
|
+
sempy_labs/_generate_semantic_model.py,sha256=hK2f61PR55080smJBIrq7BgcoTWal_4i4eQulwHjtos,18236
|
|
26
|
+
sempy_labs/_git.py,sha256=x8BrvkJNWkP6I-_os_wdNjEZVNViqfINmc-q7sGoQ3Q,17903
|
|
27
|
+
sempy_labs/_graphQL.py,sha256=WDallUQBiOqJdz0aJmYH3cUXCOW_AqhFLs0EpV8_5Rw,2749
|
|
28
|
+
sempy_labs/_helper_functions.py,sha256=O15Jlw23ECCupLs2vBojcXh7BQ7R3mj14MonVRzsiEk,84726
|
|
29
29
|
sempy_labs/_icons.py,sha256=SB9EQeoFCfD4bO6fcYuJOoPRSYenSrW0rI9G5RFsH28,3579
|
|
30
|
-
sempy_labs/_job_scheduler.py,sha256=
|
|
31
|
-
sempy_labs/_kql_databases.py,sha256=
|
|
32
|
-
sempy_labs/_kql_querysets.py,sha256=
|
|
33
|
-
sempy_labs/_kusto.py,sha256=
|
|
30
|
+
sempy_labs/_job_scheduler.py,sha256=N2zukwZk69pHSb0YYeOHV2Q9M1IYA9Ho8R1YGAGdM20,17790
|
|
31
|
+
sempy_labs/_kql_databases.py,sha256=Wr338mNf0wzvpBJYHbWHjzUudoeMZMUia_smdkzbPfI,4796
|
|
32
|
+
sempy_labs/_kql_querysets.py,sha256=C7nRv03riGJc7sbeGNz1R6dom6Wb-5dno_wAhFep468,4128
|
|
33
|
+
sempy_labs/_kusto.py,sha256=g3Up4j1KNdIGC2DDbvoduCdX1Pp8fAPGAlBAqOtaBeg,4544
|
|
34
34
|
sempy_labs/_labels.py,sha256=UfGUSicESu5uhBzRsrIRiKtZoVH3lPo_rlbYClKP8X0,3770
|
|
35
|
-
sempy_labs/_list_functions.py,sha256=
|
|
36
|
-
sempy_labs/_managed_private_endpoints.py,sha256=
|
|
37
|
-
sempy_labs/_mirrored_databases.py,sha256=
|
|
38
|
-
sempy_labs/_mirrored_warehouses.py,sha256=
|
|
39
|
-
sempy_labs/_ml_experiments.py,sha256=
|
|
35
|
+
sempy_labs/_list_functions.py,sha256=VMjUzYdqKhAYpWV_tuIuhDxzV1K2Al_aTCPKw6A2qCU,59824
|
|
36
|
+
sempy_labs/_managed_private_endpoints.py,sha256=dsjaUVq_t9DlcAw5EaQfhi4FVbM71w8RKFkDFb80x5E,7068
|
|
37
|
+
sempy_labs/_mirrored_databases.py,sha256=njjHHqXiTBNA_424MrgaE-O7lvZiyvCEen0aTcrjogs,14832
|
|
38
|
+
sempy_labs/_mirrored_warehouses.py,sha256=QvHze0WiYSMiwlskVZcfxMICXtwsLwyygJx9foLOX70,1793
|
|
39
|
+
sempy_labs/_ml_experiments.py,sha256=hC8Mh5rEbpilno-O21MeTzKOjXrhzUYX2aysSgjnNdE,3439
|
|
40
40
|
sempy_labs/_model_auto_build.py,sha256=LpeRDY-L3b8LxvxmbUXZGDfzlqcs84rAPePf9XgJ0yE,5075
|
|
41
|
-
sempy_labs/_model_bpa.py,sha256=
|
|
42
|
-
sempy_labs/_model_bpa_bulk.py,sha256=
|
|
41
|
+
sempy_labs/_model_bpa.py,sha256=ZPsBxDaxLRc3xcOCfvzK2GBCCmNTPLMP3jzW5IHcrXY,22041
|
|
42
|
+
sempy_labs/_model_bpa_bulk.py,sha256=hRY3dRBUtecrbscCZsEGv6TpCVqg_zAi8NmRq6dVMiE,15845
|
|
43
43
|
sempy_labs/_model_bpa_rules.py,sha256=SZKUHEsWzvivpNQK28zkmaJ1Z16o6_XdQPcpwxznPTg,46299
|
|
44
|
-
sempy_labs/_model_dependencies.py,sha256=
|
|
45
|
-
sempy_labs/_mounted_data_factories.py,sha256=
|
|
46
|
-
sempy_labs/_notebooks.py,sha256=
|
|
44
|
+
sempy_labs/_model_dependencies.py,sha256=0xGgubrq76zIvBdEqmEX_Pd6WdizXFVECBW6BPl2DZo,13162
|
|
45
|
+
sempy_labs/_mounted_data_factories.py,sha256=jNlSxtUs_LNwE7R9HQusBAksk2QbinKyDx3ySe_q9q4,3924
|
|
46
|
+
sempy_labs/_notebooks.py,sha256=_0Ug6SF2bihCEFt6P-6DjoGj3302OlDfXmfOJ-ue5Tg,14395
|
|
47
47
|
sempy_labs/_one_lake_integration.py,sha256=aThg8Fcei9qTFUTzg2Qwsn-3deTk0ICTCXx53Y23oso,6293
|
|
48
|
-
sempy_labs/_query_scale_out.py,sha256=
|
|
49
|
-
sempy_labs/_refresh_semantic_model.py,sha256=
|
|
50
|
-
sempy_labs/_semantic_models.py,sha256=
|
|
51
|
-
sempy_labs/_spark.py,sha256=
|
|
52
|
-
sempy_labs/_sql.py,sha256=
|
|
53
|
-
sempy_labs/_sql_endpoints.py,sha256=
|
|
54
|
-
sempy_labs/_sqldatabase.py,sha256=
|
|
55
|
-
sempy_labs/_tags.py,sha256=
|
|
56
|
-
sempy_labs/_translations.py,sha256=
|
|
57
|
-
sempy_labs/_user_delegation_key.py,sha256=
|
|
58
|
-
sempy_labs/_utils.py,sha256=
|
|
59
|
-
sempy_labs/_vertipaq.py,sha256=
|
|
60
|
-
sempy_labs/_vpax.py,sha256=
|
|
61
|
-
sempy_labs/_warehouses.py,sha256=
|
|
62
|
-
sempy_labs/_workloads.py,sha256=
|
|
63
|
-
sempy_labs/_workspace_identity.py,sha256=
|
|
64
|
-
sempy_labs/_workspaces.py,sha256=
|
|
48
|
+
sempy_labs/_query_scale_out.py,sha256=tcIEJSHjZ1gh7--WMS8sDqDfF3wbfIEX9Xm2qgahXrc,15348
|
|
49
|
+
sempy_labs/_refresh_semantic_model.py,sha256=yu92m4Ys6lbW68PP9tVCeUNHXj7cGXvyGr2WYRqgl1g,17365
|
|
50
|
+
sempy_labs/_semantic_models.py,sha256=PbDM0u1mv6-aRwUJbxfsGm2yFFBTJvYotLFUHyvMF6g,12585
|
|
51
|
+
sempy_labs/_spark.py,sha256=aQAqmRAm04NWH9j4_qmYJAWdIluoWKzHDTBPr01GWbA,19404
|
|
52
|
+
sempy_labs/_sql.py,sha256=Y7yRO8j0P6h68VNaqmWVSyfLrI9L9TMBLykovDkgIzY,8274
|
|
53
|
+
sempy_labs/_sql_endpoints.py,sha256=eD2i5r7l9FA9YIW4i0PIpsG3H5mr1HPXJ9g6Lae1uNQ,6766
|
|
54
|
+
sempy_labs/_sqldatabase.py,sha256=vmTsB1IAluQ99cf8fmcPO2z0SjAjTOM8OCD5nuJdSOI,6908
|
|
55
|
+
sempy_labs/_tags.py,sha256=tqQlj7AvbaniN8mZl59g145Ofj_wdA6Bnrna0PzlwI4,5897
|
|
56
|
+
sempy_labs/_translations.py,sha256=6A8CPmH_xvsONX4dOG5XSZ-XeJuAy5VokFJql6uf_Ak,1432
|
|
57
|
+
sempy_labs/_user_delegation_key.py,sha256=dj540zd_IGNt2GQ_a69_8IBoyZdpldx_3z6NxNV35yo,1453
|
|
58
|
+
sempy_labs/_utils.py,sha256=X7wcjg809ZyEgf6fE0mZIv9qe1n1oQX_hHXEHgR4u0U,2737
|
|
59
|
+
sempy_labs/_vertipaq.py,sha256=1UvB79xOxeGdRFINsUsreXxtZtiatHlACAfbQhv45as,38536
|
|
60
|
+
sempy_labs/_vpax.py,sha256=4rtXXGVoadvdu7uiU9PVsgKszST3XH-K56zmWdMmZEg,15471
|
|
61
|
+
sempy_labs/_warehouses.py,sha256=xCdj7Mvleolbxp3Wbtgj-RLO2OnjNNNffPFDADItsS0,7778
|
|
62
|
+
sempy_labs/_workloads.py,sha256=K2KPY1_e6SDqz_NQDBrrMlRwzEyVV5dqd1shBs8Bu6E,4731
|
|
63
|
+
sempy_labs/_workspace_identity.py,sha256=rLzrNjnWbpjNn4bu7xW0nSjG9t1nbc4xG6BdkZNKP1Q,2605
|
|
64
|
+
sempy_labs/_workspaces.py,sha256=djjY7zLLKqsN0UJqzVpCp3j6_k81RP3VimCv1IM8Eb4,18334
|
|
65
65
|
sempy_labs/_bpa_translation/_model/_translations_am-ET.po,sha256=zQVjJ-t0vtgIYan-HaXtUVJLB_PJvB53Nf5BNoOReU4,39199
|
|
66
66
|
sempy_labs/_bpa_translation/_model/_translations_ar-AE.po,sha256=QP1PjDLFccLDs9zq456crdAST57wrcWVk5rRiqqoCws,36959
|
|
67
67
|
sempy_labs/_bpa_translation/_model/_translations_bg-BG.po,sha256=sqezjpS3wfk09WD7x27bHoCBtgmqeHtyHNKTwG7-bkI,44132
|
|
@@ -100,29 +100,30 @@ sempy_labs/_bpa_translation/_model/_translations_tr-TR.po,sha256=NdW-X4E0QmeLKM0
|
|
|
100
100
|
sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=3NsFN8hoor_5L6738FjpJ8o4spwp8FNFGbVItHD-_ec,43500
|
|
101
101
|
sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=ipMbnet7ZI5mZoC8KonYKVwGmFLHFB_9KIDOoBgSNfo,26815
|
|
102
102
|
sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=5v6tVKGruqneAeMoa6F3tyg_JBL8qOpqOJofWpq2W3U,31518
|
|
103
|
-
sempy_labs/admin/__init__.py,sha256=
|
|
103
|
+
sempy_labs/admin/__init__.py,sha256=wwjwMS19-Fg2Et0D9N9NBT_svfPEhG-o4pKP_NX2kNw,3914
|
|
104
104
|
sempy_labs/admin/_activities.py,sha256=SN-uAEWvFO5nKuw4Yi483niixzxShDGMXRv0SV4s4Bk,6833
|
|
105
105
|
sempy_labs/admin/_apps.py,sha256=4R-VZqo9SGIrwqcQfnFGXIWueBhr4mSI7H8SUlLVl8s,4131
|
|
106
106
|
sempy_labs/admin/_artifacts.py,sha256=IQ1BOVKMK8Qy_5HpREUso6_NWXbftIodWekByvVvJ5k,2315
|
|
107
107
|
sempy_labs/admin/_basic_functions.py,sha256=HfJhdh8tVskRaaypU3qD_EE6IaDDR3MKJyt9Bl-56LE,16306
|
|
108
|
-
sempy_labs/admin/_capacities.py,sha256=
|
|
108
|
+
sempy_labs/admin/_capacities.py,sha256=jdRLY57cYb4I5-DlXO_E8Vari45JFxIvy4KK0nZk3BQ,16657
|
|
109
109
|
sempy_labs/admin/_dataflows.py,sha256=So7kzRdDZ2henr-gmPw-ahEBQTm_xGhZrjkW-gALLQk,1432
|
|
110
110
|
sempy_labs/admin/_datasets.py,sha256=scGbRZpR32u62HDsvKaUYtpX85n4RGx4eYjxClFIT5U,6277
|
|
111
111
|
sempy_labs/admin/_domains.py,sha256=siLhIi5UqVM9kf_Xqq-kzvwZKouyqf-wWpPhJ7D-VMk,15238
|
|
112
112
|
sempy_labs/admin/_external_data_share.py,sha256=HMwKAjSE7Y-499Fo_weaY2SnKIU8_ohTBN3qjJtuJDs,3506
|
|
113
113
|
sempy_labs/admin/_git.py,sha256=mx2B7RcU4Fi4x6HEeXEotYk0jvcbHYG9_RPjo6UowcA,2379
|
|
114
|
-
sempy_labs/admin/_items.py,sha256=
|
|
114
|
+
sempy_labs/admin/_items.py,sha256=LBvUUzqp2wV8YRiXCQGUhv7BoCbalZUojlvCukd1h6Y,9040
|
|
115
115
|
sempy_labs/admin/_reports.py,sha256=JrmooHhiS4ViZsVinUz5T_9oZ7bdn1fIeW_wI8L1BnY,7908
|
|
116
116
|
sempy_labs/admin/_scanner.py,sha256=0dNfl9W25RTxIQj1rMGhQrH1ioGWpf3-CiZOxHLZ5hQ,4345
|
|
117
117
|
sempy_labs/admin/_shared.py,sha256=axTqVqp1V1tDtq2YTuSD6M0ST4lAjXqcIfRHwkZqyOQ,3115
|
|
118
118
|
sempy_labs/admin/_tags.py,sha256=emIA626JoC9Cp_vesVNFwahUdDLAK48APNsdG5ki1Xo,3788
|
|
119
119
|
sempy_labs/admin/_tenant.py,sha256=8mewLN79Lf3a-HUKG6Cl8Oimb2kv3r7XWAJKzvEHBMc,19581
|
|
120
|
+
sempy_labs/admin/_tenant_keys.py,sha256=9yajAPmsbjT25g1-4YbcRkXK8n3JcTFKVOnR0lt2BmU,2762
|
|
120
121
|
sempy_labs/admin/_users.py,sha256=fYeUez98Dx_g6dC15S-0vttCZRUWWCrNPWNMGVtoiVE,4685
|
|
121
122
|
sempy_labs/admin/_workspaces.py,sha256=jOs2IwFWtCAoWJ4GMYLtAjAfaDlJ-i-urNUYGukpZS4,7650
|
|
122
123
|
sempy_labs/directlake/__init__.py,sha256=xDH3Y4Hxdnp1s7Whdkn6DCrS_cExcJURxkvuz-qv_HI,1879
|
|
123
124
|
sempy_labs/directlake/_directlake_schema_compare.py,sha256=8KJEdcHHP-6IuEoipDbIOQeqLUtpPt0x4ZXL54MPp0U,5047
|
|
124
125
|
sempy_labs/directlake/_directlake_schema_sync.py,sha256=hL3QwP9SN46CBqT39lkeLnJ9lLNDl5kLQryzamHUufM,6601
|
|
125
|
-
sempy_labs/directlake/_dl_helper.py,sha256=
|
|
126
|
+
sempy_labs/directlake/_dl_helper.py,sha256=X5GfDpk6FSmDzXiRXT3fHo_VLQemPgBCFVdXQMssaqw,10402
|
|
126
127
|
sempy_labs/directlake/_generate_shared_expression.py,sha256=JgyDR-E-4eAvcGkAZ0zRjNtAw_ZULzHmABwwOy9FOq0,3591
|
|
127
128
|
sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=9IxO4FuvScQig4aubpfhvu6AxASdrAP9hdW8YBKZ6xU,2292
|
|
128
129
|
sempy_labs/directlake/_get_shared_expression.py,sha256=t5aZkyCci3Anxle6NQBhjbT_pEAJcIeNZW54GCQRlHA,1172
|
|
@@ -137,14 +138,15 @@ sempy_labs/graph/__init__.py,sha256=fIx2ks5EhOiZ-8orZ7jq7txfwmfhlJ-4BdLWowm4YmE,
|
|
|
137
138
|
sempy_labs/graph/_groups.py,sha256=YRFrsJbHGCraUBlqRaL2VEN4BoGGmS2PoLjHcA6D8ME,12935
|
|
138
139
|
sempy_labs/graph/_teams.py,sha256=UH5ETsReD0pzmdgqQFkcX_95o1aUAv2lAajRJc0RIZY,3175
|
|
139
140
|
sempy_labs/graph/_users.py,sha256=cVd-FrEIsQ43c1GG5eCiZ3-xIYciQKrPcfj2fn7x5nY,9929
|
|
140
|
-
sempy_labs/lakehouse/__init__.py,sha256=
|
|
141
|
+
sempy_labs/lakehouse/__init__.py,sha256=jOCjgkIZgwl373pb6lmEwqIkbifwJUKY3K0eZ8LAVws,1245
|
|
141
142
|
sempy_labs/lakehouse/_blobs.py,sha256=peVPDCw97sB1x9a4KMKOqUB2Igu82-gb4CsvGdbubrU,8557
|
|
142
143
|
sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=QVxejuu4WFGkG-c2i9B_H6dZsb1m_FRSTraS9GahnT4,3681
|
|
143
144
|
sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=4p43Sa2mjJT4heUDp_EpF0vgZff5oNqCxjbat7IZxwk,11940
|
|
144
145
|
sempy_labs/lakehouse/_helper.py,sha256=q-z6DTO3-Iy5hM9zXpZhXRD1OPp7JAzGhcyJ_VheDcM,8644
|
|
145
146
|
sempy_labs/lakehouse/_lakehouse.py,sha256=tJFeXG1U_GcEW1EVMQKIQpz6kqh_aatAGo208cDCE0Y,10262
|
|
146
147
|
sempy_labs/lakehouse/_livy_sessions.py,sha256=XwEA0QkcFCbCGxSO6MJ5GZ-j9kjNIBiQhIkWG_Znm0E,6034
|
|
147
|
-
sempy_labs/lakehouse/
|
|
148
|
+
sempy_labs/lakehouse/_materialized_lake_views.py,sha256=EOyVxEo_SaEuVELQzhrWIZVbd-HB7iRbyx0JVpWg1xA,2814
|
|
149
|
+
sempy_labs/lakehouse/_shortcuts.py,sha256=ESBVIVY_ROcMgGXFeCJav14PkDhRFqeruDDDTJncgi4,16935
|
|
148
150
|
sempy_labs/migration/__init__.py,sha256=aA8r2g2mN_elPG8qptXlRiIcyQ9Z5hjKJo23fSNm1RY,1015
|
|
149
151
|
sempy_labs/migration/_create_pqt_file.py,sha256=IztG7XKAg98zZiWW0oUMtO7WnuqvcmE96gOAwe3UiKg,9659
|
|
150
152
|
sempy_labs/migration/_direct_lake_to_import.py,sha256=XBGQUTHp3uVgOcRk85aPtMlfdaXhrdh9AkaA0AglfSc,3987
|
|
@@ -161,19 +163,21 @@ sempy_labs/ml_model/__init__.py,sha256=2rHXo_C-70NO4t5_McN6lxGwN2M3IBB6VuQMTE0Vn
|
|
|
161
163
|
sempy_labs/ml_model/_functions.py,sha256=b_TzmVorVXdn8k0JD0SF3kXYu9fduizN6BKSq_5Ot7w,15282
|
|
162
164
|
sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
|
|
163
165
|
sempy_labs/report/__init__.py,sha256=bMX55Py9iJZqLYC1G-M1AgSwLfu4EHRhQGqym4K2Nzc,1264
|
|
164
|
-
sempy_labs/report/_download_report.py,sha256=
|
|
165
|
-
sempy_labs/report/_export_report.py,sha256=
|
|
166
|
-
sempy_labs/report/_generate_report.py,sha256=
|
|
167
|
-
sempy_labs/report/_paginated.py,sha256=
|
|
166
|
+
sempy_labs/report/_download_report.py,sha256=pvyiscU2_eZ6RW1wgYEK4MXsDNKwSY7thmcYWRhEyrs,2899
|
|
167
|
+
sempy_labs/report/_export_report.py,sha256=BICwz2rkvD914pcp3BmXjw8G7LD2IQramyWTgP-7NXc,11275
|
|
168
|
+
sempy_labs/report/_generate_report.py,sha256=o2oc5Iz4CZdYUAHv46SfKQ2s72VqMod7FzmZwigPJQY,14503
|
|
169
|
+
sempy_labs/report/_paginated.py,sha256=Tn3XUIBhi2DJcQQzRBVYLKnFnpO7T0nPfvhNcniI5dY,2424
|
|
168
170
|
sempy_labs/report/_report_bpa.py,sha256=9BNJmxDiZlldYoQvUKcWYc47eycyv_mo0-pocNub7Qk,13419
|
|
169
171
|
sempy_labs/report/_report_bpa_rules.py,sha256=kPPE1UZ_78GePULcIRUarRfdqR7s4CQ46MMS8VUyJnk,4998
|
|
170
|
-
sempy_labs/report/_report_functions.py,sha256=
|
|
172
|
+
sempy_labs/report/_report_functions.py,sha256=cBJhjoC6iNYF-I6Ak1a2i2EKQykA5TPVLoofkgsuMkk,20105
|
|
171
173
|
sempy_labs/report/_report_helper.py,sha256=L9wU0N0rvTUMglZHTxcowywrBDuZvZTv3DA4JrX84Os,7207
|
|
172
174
|
sempy_labs/report/_report_list_functions.py,sha256=m_Wf1YeZmNtOfCwIILpKUuVR7V2CnwnfhDjz1DDTxOI,3945
|
|
173
|
-
sempy_labs/report/_report_rebind.py,sha256=
|
|
175
|
+
sempy_labs/report/_report_rebind.py,sha256=acdnCUHzH_U8Elu2bvSD4p3xX-cEwKSQe9lVYzx3i7A,5850
|
|
174
176
|
sempy_labs/report/_reportwrapper.py,sha256=GI38yGY_mXlFhE-WD8-0oHlL6kmU-M_kBcPp1qozgt0,110493
|
|
175
177
|
sempy_labs/report/_save_report.py,sha256=0P1WwIBtSgwrhnjWWvf9xf-e7ifka3DWVF0HM5zeXps,5998
|
|
178
|
+
sempy_labs/report/_bpareporttemplate/.platform,sha256=kWRa6B_KwSYLsvVFDx372mQriQO8v7dJ_YzQV_cfD-Q,303
|
|
176
179
|
sempy_labs/report/_bpareporttemplate/definition.pbir,sha256=bttyHZYKqjA8OBb_cezGlX4H82cDvGZVCl1QB3fij4E,343
|
|
180
|
+
sempy_labs/report/_bpareporttemplate/.pbi/localSettings.json,sha256=kzjBlNdjbsSBBSHBwbQc298AJCr9Vp6Ex0D5PemUuT0,1578
|
|
177
181
|
sempy_labs/report/_bpareporttemplate/StaticResources/SharedResources/BaseThemes/CY24SU06.json,sha256=4N6sT5nLlYBobGmZ1Xb68uOMVVCBEyheR535js_et28,13467
|
|
178
182
|
sempy_labs/report/_bpareporttemplate/definition/report.json,sha256=-8BK5blTE-nc0Y4-M0pTHD8Znt3pHZ-u2veRppxPDBQ,3975
|
|
179
183
|
sempy_labs/report/_bpareporttemplate/definition/version.json,sha256=yL3ZZqhfHqq0MS0glrbXtQgkPk17xaTSWvPPyxBWpOc,152
|
|
@@ -201,12 +205,12 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
|
|
|
201
205
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
|
|
202
206
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
|
|
203
207
|
sempy_labs/theme/__init__.py,sha256=JN0z8w_Hc7VUIchRbpY-rjU6879msrFiSTRtMMlr_5g,185
|
|
204
|
-
sempy_labs/theme/_org_themes.py,sha256=
|
|
208
|
+
sempy_labs/theme/_org_themes.py,sha256=ArLqr1KYI6CT1_mxKOsZlVPaTO0KSkkQ1LbFy4A1fqg,3323
|
|
205
209
|
sempy_labs/tom/__init__.py,sha256=ZwSpgYDP5VamZTnYP3a1cYHiaKdktOvlOBSOY1816zY,107
|
|
206
|
-
sempy_labs/tom/_model.py,sha256=
|
|
210
|
+
sempy_labs/tom/_model.py,sha256=W74vT2th6UfMFrvfWKXV20ieIMZIaoEDr1Y5SUpZUA0,222514
|
|
207
211
|
sempy_labs/variable_library/__init__.py,sha256=qyTw5vNldnwYv-TotQSFupwznKIQfcws1UxGjf1RNNo,437
|
|
208
212
|
sempy_labs/variable_library/_functions.py,sha256=eoB3hUKFGdGMSBNDEsEF9bVoELZp5AnyDxp5BsLGeDc,13733
|
|
209
|
-
semantic_link_labs-0.
|
|
210
|
-
semantic_link_labs-0.
|
|
211
|
-
semantic_link_labs-0.
|
|
212
|
-
semantic_link_labs-0.
|
|
213
|
+
semantic_link_labs-0.12.0.dist-info/METADATA,sha256=9ob_p1JPBLfQ9Fmhh-J2YAVOjMZsdCP-wKz7Om9W7rI,27445
|
|
214
|
+
semantic_link_labs-0.12.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
215
|
+
semantic_link_labs-0.12.0.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
|
|
216
|
+
semantic_link_labs-0.12.0.dist-info/RECORD,,
|
sempy_labs/__init__.py
CHANGED
|
@@ -188,6 +188,8 @@ from ._workspaces import (
|
|
|
188
188
|
unassign_workspace_from_capacity,
|
|
189
189
|
list_workspace_role_assignments,
|
|
190
190
|
delete_workspace,
|
|
191
|
+
get_workspace_network_communication_policy,
|
|
192
|
+
set_workspace_network_communication_policy,
|
|
191
193
|
)
|
|
192
194
|
from ._notebooks import (
|
|
193
195
|
get_notebook_definition,
|
|
@@ -282,6 +284,7 @@ from ._list_functions import (
|
|
|
282
284
|
list_synonyms,
|
|
283
285
|
)
|
|
284
286
|
from ._helper_functions import (
|
|
287
|
+
get_item_definition,
|
|
285
288
|
copy_item,
|
|
286
289
|
convert_to_friendly_case,
|
|
287
290
|
resolve_environment_id,
|
|
@@ -593,4 +596,7 @@ __all__ = [
|
|
|
593
596
|
"copy_item",
|
|
594
597
|
"search_notebooks",
|
|
595
598
|
"list_notebooks",
|
|
599
|
+
"get_item_definition",
|
|
600
|
+
"get_workspace_network_communication_policy",
|
|
601
|
+
"set_workspace_network_communication_policy",
|
|
596
602
|
]
|
sempy_labs/_a_lib_info.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
lib_name = "semanticlinklabs"
|
|
2
|
-
lib_version = "0.
|
|
2
|
+
lib_version = "0.12.0"
|
sempy_labs/_authentication.py
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
from typing import Literal, Optional
|
|
2
|
-
from
|
|
1
|
+
from typing import Dict, Literal, Optional
|
|
2
|
+
from azure.core.credentials import AccessToken, TokenCredential
|
|
3
3
|
from azure.identity import ClientSecretCredential
|
|
4
4
|
from sempy._utils._log import log
|
|
5
5
|
from contextlib import contextmanager
|
|
6
6
|
import contextvars
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class ServicePrincipalTokenProvider(
|
|
9
|
+
class ServicePrincipalTokenProvider(TokenCredential):
|
|
10
10
|
"""
|
|
11
|
-
|
|
11
|
+
A class to acquire authentication token with Service Principal.
|
|
12
12
|
|
|
13
13
|
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>`_
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
+
_shorthand_scopes: Dict[str, str] = {
|
|
17
|
+
"pbi": "https://analysis.windows.net/powerbi/api/.default",
|
|
18
|
+
"storage": "https://storage.azure.com/.default",
|
|
19
|
+
"azure": "https://management.azure.com/.default",
|
|
20
|
+
"graph": "https://graph.microsoft.com/.default",
|
|
21
|
+
"asazure": "https://{region}.asazure.windows.net/.default",
|
|
22
|
+
"keyvault": "https://vault.azure.net/.default"
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
def __init__(self, credential: ClientSecretCredential):
|
|
17
26
|
|
|
18
27
|
self.credential = credential
|
|
@@ -20,7 +29,7 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
20
29
|
@classmethod
|
|
21
30
|
def from_aad_application_key_authentication(
|
|
22
31
|
cls, tenant_id: str, client_id: str, client_secret: str
|
|
23
|
-
):
|
|
32
|
+
) -> "ServicePrincipalTokenProvider":
|
|
24
33
|
"""
|
|
25
34
|
Generates the ServicePrincipalTokenProvider, providing the Service Principal information.
|
|
26
35
|
|
|
@@ -37,7 +46,7 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
37
46
|
|
|
38
47
|
Returns
|
|
39
48
|
-------
|
|
40
|
-
|
|
49
|
+
ServicePrincipalTokenProvider
|
|
41
50
|
Token provider to be used with FabricRestClient or PowerBIRestClient.
|
|
42
51
|
"""
|
|
43
52
|
credential = ClientSecretCredential(
|
|
@@ -57,7 +66,7 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
57
66
|
key_vault_tenant_id: str,
|
|
58
67
|
key_vault_client_id: str,
|
|
59
68
|
key_vault_client_secret: str,
|
|
60
|
-
):
|
|
69
|
+
) -> "ServicePrincipalTokenProvider":
|
|
61
70
|
"""
|
|
62
71
|
Generates the ServicePrincipalTokenProvider, providing the Azure Key Vault details.
|
|
63
72
|
|
|
@@ -76,7 +85,7 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
76
85
|
|
|
77
86
|
Returns
|
|
78
87
|
-------
|
|
79
|
-
|
|
88
|
+
ServicePrincipalTokenProvider
|
|
80
89
|
Token provider to be used with FabricRestClient or PowerBIRestClient.
|
|
81
90
|
"""
|
|
82
91
|
|
|
@@ -117,32 +126,65 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
117
126
|
region : str, default=None
|
|
118
127
|
The region of the Azure Analysis Services. For example: 'westus2'.
|
|
119
128
|
"""
|
|
120
|
-
if audience
|
|
121
|
-
|
|
122
|
-
"https://analysis.windows.net/powerbi/api/.default"
|
|
123
|
-
).token
|
|
124
|
-
elif audience == "storage":
|
|
125
|
-
return self.credential.get_token("https://storage.azure.com/.default").token
|
|
126
|
-
elif audience == "azure":
|
|
127
|
-
return self.credential.get_token(
|
|
128
|
-
"https://management.azure.com/.default"
|
|
129
|
-
).token
|
|
130
|
-
elif audience == "graph":
|
|
131
|
-
return self.credential.get_token(
|
|
132
|
-
"https://graph.microsoft.com/.default"
|
|
133
|
-
).token
|
|
134
|
-
elif audience == "asazure":
|
|
135
|
-
return self.credential.get_token(
|
|
136
|
-
f"https://{region}.asazure.windows.net/.default"
|
|
137
|
-
).token
|
|
138
|
-
elif audience == "keyvault":
|
|
139
|
-
return self.credential.get_token("https://vault.azure.net/.default").token
|
|
140
|
-
else:
|
|
129
|
+
# Check if audience is supported
|
|
130
|
+
if audience not in self._shorthand_scopes:
|
|
141
131
|
raise NotImplementedError
|
|
142
132
|
|
|
133
|
+
return self.get_token(audience).token
|
|
134
|
+
|
|
135
|
+
def get_token(self, *scopes, **kwargs) -> AccessToken:
|
|
136
|
+
"""
|
|
137
|
+
Gets a token for the specified scopes.
|
|
138
|
+
|
|
139
|
+
Parameters
|
|
140
|
+
----------
|
|
141
|
+
*scopes : str
|
|
142
|
+
The scopes for which to obtain a token.
|
|
143
|
+
**kwargs : dict
|
|
144
|
+
Additional parameters to pass to the token request.
|
|
145
|
+
|
|
146
|
+
Returns
|
|
147
|
+
-------
|
|
148
|
+
AccessToken
|
|
149
|
+
The access token.
|
|
150
|
+
"""
|
|
151
|
+
if len(scopes) == 0:
|
|
152
|
+
scopes = ("pbi",)
|
|
153
|
+
|
|
154
|
+
region = kwargs.pop("region", None)
|
|
155
|
+
scopes = [self._get_fully_qualified_scope(scope, region=region) for scope in scopes]
|
|
156
|
+
return self.credential.get_token(*scopes, **kwargs)
|
|
157
|
+
|
|
158
|
+
def _get_fully_qualified_scope(self, scope: str, region: Optional[str] = None) -> str:
|
|
159
|
+
"""
|
|
160
|
+
Resolve to fully qualified scope if Fabric short-handed scope is given.
|
|
161
|
+
Otherwise, return the original scope.
|
|
162
|
+
|
|
163
|
+
Parameters
|
|
164
|
+
----------
|
|
165
|
+
scope : str
|
|
166
|
+
The scope to resolve.
|
|
167
|
+
region : str, default=None
|
|
168
|
+
The specific region to use to resolve scope.
|
|
169
|
+
Required if scope is "asazure".
|
|
170
|
+
|
|
171
|
+
Returns
|
|
172
|
+
-------
|
|
173
|
+
str
|
|
174
|
+
The resolved scope.
|
|
175
|
+
"""
|
|
176
|
+
fully_qualified_scope = self._shorthand_scopes.get(scope, scope)
|
|
177
|
+
|
|
178
|
+
if scope == "asazure":
|
|
179
|
+
if region is None:
|
|
180
|
+
raise ValueError("Region is required for 'asazure' scope")
|
|
181
|
+
return fully_qualified_scope.format(region=region)
|
|
182
|
+
|
|
183
|
+
return fully_qualified_scope
|
|
184
|
+
|
|
143
185
|
|
|
144
186
|
def _get_headers(
|
|
145
|
-
token_provider:
|
|
187
|
+
token_provider: TokenCredential,
|
|
146
188
|
audience: Literal[
|
|
147
189
|
"pbi", "storage", "azure", "graph", "asazure", "keyvault"
|
|
148
190
|
] = "azure",
|
|
@@ -151,7 +193,7 @@ def _get_headers(
|
|
|
151
193
|
Generates headers for an API request.
|
|
152
194
|
"""
|
|
153
195
|
|
|
154
|
-
token = token_provider(audience
|
|
196
|
+
token = token_provider.get_token(audience).token
|
|
155
197
|
|
|
156
198
|
headers = {"Authorization": f"Bearer {token}"}
|
|
157
199
|
|
|
@@ -202,7 +244,14 @@ def service_principal_authentication(
|
|
|
202
244
|
)
|
|
203
245
|
)
|
|
204
246
|
try:
|
|
205
|
-
|
|
247
|
+
from sempy.fabric import set_service_principal
|
|
248
|
+
|
|
249
|
+
with set_service_principal(
|
|
250
|
+
(key_vault_uri, key_vault_tenant_id),
|
|
251
|
+
(key_vault_uri, key_vault_client_id),
|
|
252
|
+
client_secret=(key_vault_uri, key_vault_client_secret),
|
|
253
|
+
):
|
|
254
|
+
yield
|
|
206
255
|
finally:
|
|
207
256
|
# Restore the prior state
|
|
208
257
|
if prior_token is None:
|
sempy_labs/_capacities.py
CHANGED
|
@@ -4,12 +4,12 @@ import sempy_labs._icons as icons
|
|
|
4
4
|
from sempy.fabric.exceptions import FabricHTTPException
|
|
5
5
|
import requests
|
|
6
6
|
import pandas as pd
|
|
7
|
-
from ._authentication import (
|
|
7
|
+
from sempy_labs._authentication import (
|
|
8
8
|
_get_headers,
|
|
9
9
|
ServicePrincipalTokenProvider,
|
|
10
10
|
)
|
|
11
11
|
from uuid import UUID
|
|
12
|
-
from ._helper_functions import (
|
|
12
|
+
from sempy_labs._helper_functions import (
|
|
13
13
|
_is_valid_uuid,
|
|
14
14
|
_update_dataframe_datatypes,
|
|
15
15
|
_base_api,
|
|
@@ -2,20 +2,20 @@ import sempy.fabric as fabric
|
|
|
2
2
|
from typing import Optional, List
|
|
3
3
|
from sempy._utils._log import log
|
|
4
4
|
import sempy_labs._icons as icons
|
|
5
|
-
from ._workspaces import assign_workspace_to_capacity
|
|
6
|
-
from .admin import (
|
|
5
|
+
from sempy_labs._workspaces import assign_workspace_to_capacity
|
|
6
|
+
from sempy_labs.admin import (
|
|
7
7
|
assign_workspaces_to_capacity,
|
|
8
8
|
)
|
|
9
9
|
from .admin._capacities import (
|
|
10
10
|
_list_capacities_meta,
|
|
11
11
|
list_capacities,
|
|
12
12
|
)
|
|
13
|
-
from ._helper_functions import (
|
|
13
|
+
from sempy_labs._helper_functions import (
|
|
14
14
|
resolve_capacity_id,
|
|
15
15
|
convert_to_alphanumeric_lowercase,
|
|
16
16
|
_base_api,
|
|
17
17
|
)
|
|
18
|
-
from ._capacities import create_fabric_capacity
|
|
18
|
+
from sempy_labs._capacities import create_fabric_capacity
|
|
19
19
|
from uuid import UUID
|
|
20
20
|
|
|
21
21
|
|
sempy_labs/_clear_cache.py
CHANGED