semantic-link-labs 0.8.11__py3-none-any.whl → 0.9.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.8.11.dist-info → semantic_link_labs-0.9.0.dist-info}/METADATA +5 -5
- {semantic_link_labs-0.8.11.dist-info → semantic_link_labs-0.9.0.dist-info}/RECORD +40 -40
- {semantic_link_labs-0.8.11.dist-info → semantic_link_labs-0.9.0.dist-info}/WHEEL +1 -1
- sempy_labs/__init__.py +29 -2
- sempy_labs/_authentication.py +80 -4
- sempy_labs/_capacities.py +770 -200
- sempy_labs/_capacity_migration.py +7 -37
- sempy_labs/_clear_cache.py +8 -8
- sempy_labs/_deployment_pipelines.py +1 -1
- sempy_labs/_gateways.py +2 -0
- sempy_labs/_generate_semantic_model.py +8 -0
- sempy_labs/_helper_functions.py +119 -79
- sempy_labs/_job_scheduler.py +138 -3
- sempy_labs/_list_functions.py +40 -31
- sempy_labs/_model_bpa.py +207 -204
- sempy_labs/_model_bpa_bulk.py +2 -2
- sempy_labs/_model_bpa_rules.py +3 -3
- sempy_labs/_notebooks.py +2 -0
- sempy_labs/_query_scale_out.py +8 -0
- sempy_labs/_sql.py +11 -7
- sempy_labs/_vertipaq.py +4 -2
- sempy_labs/_warehouses.py +6 -6
- sempy_labs/admin/_basic_functions.py +156 -103
- sempy_labs/admin/_domains.py +7 -2
- sempy_labs/admin/_git.py +4 -1
- sempy_labs/admin/_items.py +7 -2
- sempy_labs/admin/_scanner.py +7 -4
- sempy_labs/directlake/_directlake_schema_compare.py +7 -2
- sempy_labs/directlake/_directlake_schema_sync.py +6 -0
- sempy_labs/directlake/_dl_helper.py +51 -31
- sempy_labs/directlake/_get_directlake_lakehouse.py +20 -27
- sempy_labs/directlake/_update_directlake_partition_entity.py +5 -0
- sempy_labs/lakehouse/_get_lakehouse_columns.py +17 -22
- sempy_labs/lakehouse/_get_lakehouse_tables.py +20 -32
- sempy_labs/lakehouse/_lakehouse.py +2 -19
- sempy_labs/report/_generate_report.py +45 -0
- sempy_labs/report/_report_bpa.py +2 -2
- sempy_labs/tom/_model.py +97 -16
- {semantic_link_labs-0.8.11.dist-info → semantic_link_labs-0.9.0.dist-info}/LICENSE +0 -0
- {semantic_link_labs-0.8.11.dist-info → semantic_link_labs-0.9.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: semantic-link-labs
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Semantic Link Labs for Microsoft Fabric
|
|
5
5
|
Author: Microsoft Corporation
|
|
6
6
|
License: MIT License
|
|
@@ -15,11 +15,10 @@ 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.
|
|
18
|
+
Requires-Dist: semantic-link-sempy>=0.8.5
|
|
19
19
|
Requires-Dist: anytree
|
|
20
20
|
Requires-Dist: powerbiclient
|
|
21
21
|
Requires-Dist: polib
|
|
22
|
-
Requires-Dist: azure.mgmt.resource
|
|
23
22
|
Requires-Dist: jsonpath_ng
|
|
24
23
|
Provides-Extra: test
|
|
25
24
|
Requires-Dist: pytest>=8.2.1; extra == "test"
|
|
@@ -27,7 +26,7 @@ Requires-Dist: pytest>=8.2.1; extra == "test"
|
|
|
27
26
|
# Semantic Link Labs
|
|
28
27
|
|
|
29
28
|
[](https://badge.fury.io/py/semantic-link-labs)
|
|
30
|
-
[](https://readthedocs.org/projects/semantic-link-labs/)
|
|
31
30
|
[](https://github.com/psf/black)
|
|
32
31
|
[](https://pepy.tech/project/semantic-link-labs)
|
|
33
32
|
|
|
@@ -142,6 +141,7 @@ An even better way to ensure the semantic-link-labs library is available in your
|
|
|
142
141
|
2. Select your newly created environment within the 'Environment' drop down in the navigation bar at the top of the notebook
|
|
143
142
|
|
|
144
143
|
## Version History
|
|
144
|
+
* [0.9.0](https://github.com/microsoft/semantic-link-labs/releases/tag/0.9.0) (January 22, 2024)
|
|
145
145
|
* [0.8.11](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.11) (December 19, 2024)
|
|
146
146
|
* [0.8.10](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.10) (December 16, 2024)
|
|
147
147
|
* [0.8.9](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.9) (December 4, 2024)
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
sempy_labs/__init__.py,sha256=
|
|
1
|
+
sempy_labs/__init__.py,sha256=JkIsrdcqLJL0-jR32hFeRzSzOURnYargMZrWRbnyoRM,14001
|
|
2
2
|
sempy_labs/_ai.py,sha256=CzsNw6Wpd2B5Rd0RcY250-_p0L-0gFoMNLEc_KmrobU,16177
|
|
3
|
-
sempy_labs/_authentication.py,sha256=
|
|
4
|
-
sempy_labs/_capacities.py,sha256=
|
|
5
|
-
sempy_labs/_capacity_migration.py,sha256=
|
|
6
|
-
sempy_labs/_clear_cache.py,sha256=
|
|
3
|
+
sempy_labs/_authentication.py,sha256=c9hDBj6vZ91CiWLys2Zoo0Dl-YyRjWMeX7bJllB0Tf8,6921
|
|
4
|
+
sempy_labs/_capacities.py,sha256=8FdjQ5Uc6kDarqxpfeeNedsigJLGPyGyXqzEgIQQrvc,45294
|
|
5
|
+
sempy_labs/_capacity_migration.py,sha256=F74x6ptdYi1joeleoZ_jKVI-G73tQEDKO4_IrKAeQbU,26152
|
|
6
|
+
sempy_labs/_clear_cache.py,sha256=02zw7ccbKZtvCIgr5u5MyyJEgevzFFcxtU727y4eafM,12780
|
|
7
7
|
sempy_labs/_connections.py,sha256=l6iDJgB-ZGR7jhNHGlhM1__xRVciLNAyILWLo8IX5bs,17693
|
|
8
8
|
sempy_labs/_data_pipelines.py,sha256=1elajdbtNySi-XSqeshG6q9dVUsjNvb6lvVQqelpzoI,5754
|
|
9
9
|
sempy_labs/_dataflows.py,sha256=hchdtA4pIC4R7q0QOKkE5Lmef_HBfRftoRorvp8-rt4,8311
|
|
10
10
|
sempy_labs/_dax.py,sha256=64yaKbSUpoDnub7uKXsuznJ6u_0peN_RfAZJYEB6uPY,9302
|
|
11
|
-
sempy_labs/_deployment_pipelines.py,sha256=
|
|
11
|
+
sempy_labs/_deployment_pipelines.py,sha256=LdrzvcU7JmspGAWBkSMViVyp0ZR-VGhChSGnk3SFRho,6027
|
|
12
12
|
sempy_labs/_documentation.py,sha256=yVA8VPEzx_fmljtcvSxtB7-BeupYsfdMXXjp6Fpnyo8,5007
|
|
13
13
|
sempy_labs/_environments.py,sha256=m0bZNUWERS0zMwVbGaHhJBbugpmql89V_QuFx4n20BI,5574
|
|
14
14
|
sempy_labs/_eventhouses.py,sha256=cmGrvH2j7SnpOIiYiILBRpgUVeFq18vBhSOzLiMAMV4,4161
|
|
15
15
|
sempy_labs/_eventstreams.py,sha256=MNjeHQCfKQ99vxr9J42qDR85Kmg4D5x3on3irRxwViQ,4186
|
|
16
16
|
sempy_labs/_external_data_shares.py,sha256=lKuAoW2M3SkWo4Tp0isd3W_Ich473605odAJcrtBm-c,6793
|
|
17
|
-
sempy_labs/_gateways.py,sha256=
|
|
18
|
-
sempy_labs/_generate_semantic_model.py,sha256=
|
|
17
|
+
sempy_labs/_gateways.py,sha256=nmxfSLf6FdEGrtcnJBI7IFk7b9gPWofjy8bXBQjqZNw,16337
|
|
18
|
+
sempy_labs/_generate_semantic_model.py,sha256=eOugdIGf7m-Tdh8fFSgRbz0NkzqUSj16wTUF_R5ekYE,18391
|
|
19
19
|
sempy_labs/_git.py,sha256=ZHIo5qnR9QbV1DVKayBSb0i9iBxthkEtfm4YMKbUwNo,15926
|
|
20
|
-
sempy_labs/_helper_functions.py,sha256=
|
|
20
|
+
sempy_labs/_helper_functions.py,sha256=JjkMTpvK8GWxAGBxOHb_jrsOwwXZqNXGafjVunpyfck,41615
|
|
21
21
|
sempy_labs/_icons.py,sha256=ez2dx_LCti71S_-eB6WYQ-kOMyiBL8ZJN12-ev5dcmA,3579
|
|
22
|
-
sempy_labs/_job_scheduler.py,sha256=
|
|
22
|
+
sempy_labs/_job_scheduler.py,sha256=Xfpn-_jyWPrv9Gnj_GBrXTyQPHCS1zLD1oNjZKNd3ZU,7697
|
|
23
23
|
sempy_labs/_kql_databases.py,sha256=z4UmjkLPOoIspystiCqA-4inpK5jv6IGYf-DsEcihhg,4746
|
|
24
24
|
sempy_labs/_kql_querysets.py,sha256=csnvTKB3jtcf_tv6D6okY0k445DVNcSmN253y6dRZww,4282
|
|
25
|
-
sempy_labs/_list_functions.py,sha256=
|
|
25
|
+
sempy_labs/_list_functions.py,sha256=nnNptMa_768jclvFmow1AC_pba3k6y5C7BkqFPlPoDc,62795
|
|
26
26
|
sempy_labs/_managed_private_endpoints.py,sha256=Cbql3ppCfLiCPqAvaApXL2wmjDyyljdZwibMFNsYYCk,6299
|
|
27
27
|
sempy_labs/_mirrored_databases.py,sha256=vbgbezabeO1QvN20IEmLCgag_aPAHsozDJIpkRNAgRU,14704
|
|
28
28
|
sempy_labs/_mirrored_warehouses.py,sha256=Q4fyl3Ov753nS68uG99EHSc9MwgAwwI4DEuQmx5XNaM,1816
|
|
29
29
|
sempy_labs/_ml_experiments.py,sha256=_Lj_aJJbhWAWg98Q1NY77wmelq-h5jLkTSnfv-Xnhds,4321
|
|
30
30
|
sempy_labs/_ml_models.py,sha256=74ncPj0PcTSrCkMmx3aKFYtel9B-Bb6OdV0TbiVJrjc,4166
|
|
31
31
|
sempy_labs/_model_auto_build.py,sha256=PTQo3dufzLSFcQ5shFkmBWAVSdP7cTJgpUclrcXyNbg,5105
|
|
32
|
-
sempy_labs/_model_bpa.py,sha256=
|
|
33
|
-
sempy_labs/_model_bpa_bulk.py,sha256=
|
|
34
|
-
sempy_labs/_model_bpa_rules.py,sha256=
|
|
32
|
+
sempy_labs/_model_bpa.py,sha256=7NIKlF7Mhxm0RxLK42Pi3aLOiRmxFFb_20aPTHLM9W4,21413
|
|
33
|
+
sempy_labs/_model_bpa_bulk.py,sha256=F_AzebdpMm7QvYuSuSj52NTg6jYE9H1FJJDpdnyNF-g,16039
|
|
34
|
+
sempy_labs/_model_bpa_rules.py,sha256=rYDIsGcoynntcdNA1O3sLf-e6R6dspIBByhWrziV59Q,45555
|
|
35
35
|
sempy_labs/_model_dependencies.py,sha256=rMh5FWrVNNs5uHC1AWIH1MwhZ3lvpb08ECwNQ7-7zvs,13111
|
|
36
|
-
sempy_labs/_notebooks.py,sha256=
|
|
36
|
+
sempy_labs/_notebooks.py,sha256=oesdAFq195F2ccI-co6DBGypiwQiranSRFY4A83jbIY,8491
|
|
37
37
|
sempy_labs/_one_lake_integration.py,sha256=fnmM6MeiME5ks1Jd7r3tWYKSafU37Um90K6iDx5S5zg,6223
|
|
38
|
-
sempy_labs/_query_scale_out.py,sha256=
|
|
38
|
+
sempy_labs/_query_scale_out.py,sha256=uHF4w6Bp1fiX-5FSr_BGwlr-lNRe_El7WtK8j3V9fXw,16454
|
|
39
39
|
sempy_labs/_refresh_semantic_model.py,sha256=G6j1Pj9HBTRbJQ2UX_fxYzoBrzgUmlxy_7_eEijqLtc,17547
|
|
40
40
|
sempy_labs/_spark.py,sha256=txetwju75jz1mkQNY-QUscp0at7StDYHLpjvJ0-v7xQ,20340
|
|
41
|
-
sempy_labs/_sql.py,sha256
|
|
41
|
+
sempy_labs/_sql.py,sha256=-YYal5uqpQvmpy8MOZtUPEcjGLuVk_5dBNjO9ykkLJg,5532
|
|
42
42
|
sempy_labs/_translations.py,sha256=CxpfnyCmn6hAiImxTOvz6x1HG4ppZORHCemJogKPV-M,16193
|
|
43
|
-
sempy_labs/_vertipaq.py,sha256=
|
|
44
|
-
sempy_labs/_warehouses.py,sha256=
|
|
43
|
+
sempy_labs/_vertipaq.py,sha256=YX69B1sMzKyQqVquU74yLidR7eEgzOrg6hc2GY-9jr4,37972
|
|
44
|
+
sempy_labs/_warehouses.py,sha256=oiKK4UFmfisvbmnrd1lGQr1rt_kzl34x2a52KDMTdRU,7430
|
|
45
45
|
sempy_labs/_workloads.py,sha256=x3dS2mOkrS9rA-p70z8849DZlMIvMbzTjMzO_YmnHRg,4449
|
|
46
46
|
sempy_labs/_workspace_identity.py,sha256=Av_9hHBHzgOZE3mYiE9v6015tnAJfzfRyqm2_zUOt5c,2357
|
|
47
47
|
sempy_labs/_workspaces.py,sha256=iDVbGsHksDDli_6_v1wcL3a0xLIyXY8Bd1FDHpcRlOE,11510
|
|
@@ -84,29 +84,29 @@ sempy_labs/_bpa_translation/_model/_translations_uk-UA.po,sha256=3NsFN8hoor_5L67
|
|
|
84
84
|
sempy_labs/_bpa_translation/_model/_translations_zh-CN.po,sha256=ipMbnet7ZI5mZoC8KonYKVwGmFLHFB_9KIDOoBgSNfo,26815
|
|
85
85
|
sempy_labs/_bpa_translation/_model/_translations_zu-ZA.po,sha256=5v6tVKGruqneAeMoa6F3tyg_JBL8qOpqOJofWpq2W3U,31518
|
|
86
86
|
sempy_labs/admin/__init__.py,sha256=YYOwKRfRr6alAez4BImlPcX9bQExATrb856BRq7a3O8,1945
|
|
87
|
-
sempy_labs/admin/_basic_functions.py,sha256=
|
|
88
|
-
sempy_labs/admin/_domains.py,sha256=
|
|
87
|
+
sempy_labs/admin/_basic_functions.py,sha256=sGkUUM0v0G6aEqzy-WEoEyICe8uXz1FFDeN2yvZrmaQ,39846
|
|
88
|
+
sempy_labs/admin/_domains.py,sha256=XXkCusjdAnRe2zW1aFty0YnUpsgeV_U1XeYhD3U3UgU,12857
|
|
89
89
|
sempy_labs/admin/_external_data_share.py,sha256=NNdkBbs0OhSmZHNCN0QehWEdbx-amkxxLXAPBBKh11I,3512
|
|
90
|
-
sempy_labs/admin/_git.py,sha256=
|
|
91
|
-
sempy_labs/admin/_items.py,sha256=
|
|
92
|
-
sempy_labs/admin/_scanner.py,sha256=
|
|
90
|
+
sempy_labs/admin/_git.py,sha256=yvqfpvFyprV_BhNUcD6Bp76vDWGQM0um53wbJzBlauw,2438
|
|
91
|
+
sempy_labs/admin/_items.py,sha256=7f6pDDdqORgy1wg-qBv96exYwLphkOb767AWA2p13tg,8936
|
|
92
|
+
sempy_labs/admin/_scanner.py,sha256=5NfCMkafBkJQB9eq0q03dOgc2_FpD3b6S9tbNWwsZ_k,4785
|
|
93
93
|
sempy_labs/directlake/__init__.py,sha256=etaj-3wqe5t93mu74tGYjEOQ6gtHWUogidOygiVvlq8,2131
|
|
94
|
-
sempy_labs/directlake/_directlake_schema_compare.py,sha256=
|
|
95
|
-
sempy_labs/directlake/_directlake_schema_sync.py,sha256=
|
|
96
|
-
sempy_labs/directlake/_dl_helper.py,sha256=
|
|
94
|
+
sempy_labs/directlake/_directlake_schema_compare.py,sha256=Cjw1l05jCetWPKvnqmcp7kzCe_RIWb9Pd-uwSbDrnVI,4989
|
|
95
|
+
sempy_labs/directlake/_directlake_schema_sync.py,sha256=5nDyE-8ApeaUJO9aJLasop8G9bG9TjPamDQvgAlCUew,4671
|
|
96
|
+
sempy_labs/directlake/_dl_helper.py,sha256=IVhZHBxK7LTFxlSgTTFowhR8Ygu_Z8ZnLCFDIoCJ9Y4,10722
|
|
97
97
|
sempy_labs/directlake/_generate_shared_expression.py,sha256=93ufAnD-qM0beRQp7lSzsuOAvhnMXqkoJoZei2RNVYg,3141
|
|
98
|
-
sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=
|
|
98
|
+
sempy_labs/directlake/_get_directlake_lakehouse.py,sha256=LzB-2aj2m8YqfOfWIGqm8mA_LOn2YSbdYWIMpMOhnrQ,2338
|
|
99
99
|
sempy_labs/directlake/_get_shared_expression.py,sha256=qc85kXggkx_7Sz_rAAli_yPnLzrGZpgD8IfVbTfZhQM,1133
|
|
100
100
|
sempy_labs/directlake/_guardrails.py,sha256=YO8OycXDxmWrtH8nTz5a4AddfnpskM83rTPEPBVpqbM,2701
|
|
101
101
|
sempy_labs/directlake/_list_directlake_model_calc_tables.py,sha256=QA35_8YWK4b8-wEvHiRnCm9me_XD2noLqxAtE2pCgnY,2451
|
|
102
102
|
sempy_labs/directlake/_show_unsupported_directlake_objects.py,sha256=xu2PUaXtZAbgYksc0YSlIZvL9rh-oI6rLhHnHwoNjYI,3453
|
|
103
103
|
sempy_labs/directlake/_update_directlake_model_lakehouse_connection.py,sha256=DC8Ig8oJtPY5qdWytIy03iiqYiQxLoRmQ5hsu6I69Sw,6348
|
|
104
|
-
sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=
|
|
104
|
+
sempy_labs/directlake/_update_directlake_partition_entity.py,sha256=z6dSrzPzRTQOVByLcGigMyXOF9YAUjSEqeAyAeVGh5U,8335
|
|
105
105
|
sempy_labs/directlake/_warm_cache.py,sha256=mFwyhtsCPJd3nDKcwMkyFtXbDhE77WCPBZkYppIRVq4,9207
|
|
106
106
|
sempy_labs/lakehouse/__init__.py,sha256=6LVQltQ3cjyiuxvjXTuNdJ163zSqi4h_tEZY4zsxuSw,647
|
|
107
|
-
sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=
|
|
108
|
-
sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=
|
|
109
|
-
sempy_labs/lakehouse/_lakehouse.py,sha256=
|
|
107
|
+
sempy_labs/lakehouse/_get_lakehouse_columns.py,sha256=y1WZ0D5HfzVVqWQvpzz6DuEhpncNN8LgQnBfghbh0vA,2638
|
|
108
|
+
sempy_labs/lakehouse/_get_lakehouse_tables.py,sha256=UOZ70YX7gwVg6xaJsJ53vTFz2OJ_Eif_COT-4Ogxf1c,8682
|
|
109
|
+
sempy_labs/lakehouse/_lakehouse.py,sha256=Yg1PxUIGFYnmXyAAFTLcXtBdwhyZ-YuRmeiuCg1BweI,4808
|
|
110
110
|
sempy_labs/lakehouse/_shortcuts.py,sha256=YqII1rBOLebNPz8OroaTAgZFb96T61Lxqfzz4gct_Fo,8103
|
|
111
111
|
sempy_labs/migration/__init__.py,sha256=w4vvGk6wTWXVfofJDmio2yIFvSSJsxOpjv6mvNGmrOI,1043
|
|
112
112
|
sempy_labs/migration/_create_pqt_file.py,sha256=eRK0Jz9ZeV_7jV3kNRze0bTAIqxsAZXLKMGE_loKOaY,9677
|
|
@@ -119,9 +119,9 @@ sempy_labs/migration/_refresh_calc_tables.py,sha256=lKkwVBN7eyDoMJd0cv4jkLyO6iGj
|
|
|
119
119
|
sempy_labs/report/_BPAReportTemplate.json,sha256=9Uh-7E6d2ooxQ7j5JRayv_ayEULc7Gzg42kZGKdOqH8,63920
|
|
120
120
|
sempy_labs/report/__init__.py,sha256=esE_i1lL2AdcwWs7cE8AKSXZy_7w_4jJJtFULFkDPcU,1244
|
|
121
121
|
sempy_labs/report/_download_report.py,sha256=BtgcHiz1jYeC1fr908oPot9_K00Ej_OadCYfd2BKL6E,2848
|
|
122
|
-
sempy_labs/report/_generate_report.py,sha256=
|
|
122
|
+
sempy_labs/report/_generate_report.py,sha256=bzyMgov414v3rrTOHRDNf24C_E_3mFH73znAP8OmL30,14331
|
|
123
123
|
sempy_labs/report/_paginated.py,sha256=khQHoanEsxoVL3g08WrOPcsI3ggo9TAlb5cNXgOs7dg,2278
|
|
124
|
-
sempy_labs/report/_report_bpa.py,sha256=
|
|
124
|
+
sempy_labs/report/_report_bpa.py,sha256=bMZlvFVKypRCC7uC0QmkqV9i4n5nMj3X-tI2N6OOxLc,13861
|
|
125
125
|
sempy_labs/report/_report_bpa_rules.py,sha256=tPVGA0hmE6QMLlWtig7Va7Ksr2yXWl_Lndq--tWWd6w,4959
|
|
126
126
|
sempy_labs/report/_report_functions.py,sha256=49TrYBIeWqth__q9GodacXIRdn90HBZfzBUv5nI01Gw,30007
|
|
127
127
|
sempy_labs/report/_report_helper.py,sha256=NcdWgFuh1GjDwVPzy6QWwg3ecaJKoWzZdhbxT6hbbdA,10599
|
|
@@ -158,9 +158,9 @@ sempy_labs/report/_bpareporttemplate/definition/pages/c597da16dc7e63222a82/visua
|
|
|
158
158
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/page.json,sha256=wBVuNc8S2NaUA0FC708w6stmR2djNZp8nAsHMqesgsc,293
|
|
159
159
|
sempy_labs/report/_bpareporttemplate/definition/pages/d37dce724a0ccc30044b/visuals/ce8532a7e25020271077/visual.json,sha256=mlY6t9OlSe-Y6_QmXJpS1vggU6Y3FjISUKECL8FVSg8,931
|
|
160
160
|
sempy_labs/tom/__init__.py,sha256=Qbs8leW0fjzvWwOjyWK3Hjeehu7IvpB1beASGsi28bk,121
|
|
161
|
-
sempy_labs/tom/_model.py,sha256=
|
|
162
|
-
semantic_link_labs-0.
|
|
163
|
-
semantic_link_labs-0.
|
|
164
|
-
semantic_link_labs-0.
|
|
165
|
-
semantic_link_labs-0.
|
|
166
|
-
semantic_link_labs-0.
|
|
161
|
+
sempy_labs/tom/_model.py,sha256=Hju9gqw374JQSNfdiujauRGnHxz7dUgXSXyN1Xhgdr8,178744
|
|
162
|
+
semantic_link_labs-0.9.0.dist-info/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
163
|
+
semantic_link_labs-0.9.0.dist-info/METADATA,sha256=uJItbGxzVXYs6fJw6oSX4e-jilLK1ZPcvWkCI1_XHug,21356
|
|
164
|
+
semantic_link_labs-0.9.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
165
|
+
semantic_link_labs-0.9.0.dist-info/top_level.txt,sha256=kiQX1y42Dbein1l3Q8jMUYyRulDjdlc2tMepvtrvixQ,11
|
|
166
|
+
semantic_link_labs-0.9.0.dist-info/RECORD,,
|
sempy_labs/__init__.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
from sempy_labs._job_scheduler import
|
|
1
|
+
from sempy_labs._job_scheduler import (
|
|
2
|
+
list_item_job_instances,
|
|
3
|
+
list_item_schedules,
|
|
4
|
+
)
|
|
2
5
|
from sempy_labs._gateways import (
|
|
3
6
|
list_gateway_members,
|
|
4
7
|
list_gateway_role_assigments,
|
|
@@ -11,9 +14,9 @@ from sempy_labs._gateways import (
|
|
|
11
14
|
update_on_premises_gateway,
|
|
12
15
|
bind_semantic_model_to_gateway,
|
|
13
16
|
)
|
|
14
|
-
|
|
15
17
|
from sempy_labs._authentication import (
|
|
16
18
|
ServicePrincipalTokenProvider,
|
|
19
|
+
service_principal_authentication,
|
|
17
20
|
)
|
|
18
21
|
from sempy_labs._mirrored_databases import (
|
|
19
22
|
get_mirrored_database_definition,
|
|
@@ -118,6 +121,17 @@ from sempy_labs._capacities import (
|
|
|
118
121
|
delete_embedded_capacity,
|
|
119
122
|
delete_premium_capacity,
|
|
120
123
|
create_resource_group,
|
|
124
|
+
list_skus,
|
|
125
|
+
list_skus_for_capacity,
|
|
126
|
+
list_subscriptions,
|
|
127
|
+
list_tenants,
|
|
128
|
+
get_subscription,
|
|
129
|
+
check_resource_group_existence,
|
|
130
|
+
list_storage_accounts,
|
|
131
|
+
create_storage_account,
|
|
132
|
+
create_or_update_resource_group,
|
|
133
|
+
list_resource_groups,
|
|
134
|
+
get_resource_group,
|
|
121
135
|
)
|
|
122
136
|
from sempy_labs._spark import (
|
|
123
137
|
get_spark_settings,
|
|
@@ -470,4 +484,17 @@ __all__ = [
|
|
|
470
484
|
"bind_semantic_model_to_gateway",
|
|
471
485
|
"list_semantic_model_errors",
|
|
472
486
|
"list_item_job_instances",
|
|
487
|
+
"list_item_schedules",
|
|
488
|
+
"list_skus",
|
|
489
|
+
"list_skus_for_capacity",
|
|
490
|
+
"list_subscriptions",
|
|
491
|
+
"list_tenants",
|
|
492
|
+
"get_subscription",
|
|
493
|
+
"check_resource_group_existence",
|
|
494
|
+
"list_storage_accounts",
|
|
495
|
+
"create_storage_account",
|
|
496
|
+
"create_or_update_resource_group",
|
|
497
|
+
"list_resource_groups",
|
|
498
|
+
"get_resource_group",
|
|
499
|
+
"service_principal_authentication",
|
|
473
500
|
]
|
sempy_labs/_authentication.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
from typing import Literal
|
|
1
|
+
from typing import Literal, Optional
|
|
2
2
|
from sempy.fabric._token_provider import TokenProvider
|
|
3
3
|
from azure.identity import ClientSecretCredential
|
|
4
|
+
from sempy._utils._log import log
|
|
5
|
+
from contextlib import contextmanager
|
|
6
|
+
import contextvars
|
|
4
7
|
|
|
5
8
|
|
|
6
9
|
class ServicePrincipalTokenProvider(TokenProvider):
|
|
@@ -14,6 +17,7 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
14
17
|
|
|
15
18
|
self.credential = credential
|
|
16
19
|
|
|
20
|
+
@log
|
|
17
21
|
@classmethod
|
|
18
22
|
def from_aad_application_key_authentication(
|
|
19
23
|
cls, tenant_id: str, client_id: str, client_secret: str
|
|
@@ -41,8 +45,13 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
41
45
|
tenant_id=tenant_id, client_id=client_id, client_secret=client_secret
|
|
42
46
|
)
|
|
43
47
|
|
|
48
|
+
cls.tenant_id = tenant_id
|
|
49
|
+
cls.client_id = client_id
|
|
50
|
+
cls.client_secret = client_secret
|
|
51
|
+
|
|
44
52
|
return cls(credential)
|
|
45
53
|
|
|
54
|
+
@log
|
|
46
55
|
@classmethod
|
|
47
56
|
def from_azure_key_vault(
|
|
48
57
|
cls,
|
|
@@ -89,16 +98,26 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
89
98
|
tenant_id=tenant_id, client_id=client_id, client_secret=client_secret
|
|
90
99
|
)
|
|
91
100
|
|
|
101
|
+
cls.tenant_id = tenant_id
|
|
102
|
+
cls.client_id = client_id
|
|
103
|
+
cls.client_secret = client_secret
|
|
104
|
+
|
|
92
105
|
return cls(credential)
|
|
93
106
|
|
|
94
107
|
def __call__(
|
|
95
|
-
self,
|
|
108
|
+
self,
|
|
109
|
+
audience: Literal[
|
|
110
|
+
"pbi", "storage", "azure", "graph", "asazure", "keyvault"
|
|
111
|
+
] = "pbi",
|
|
112
|
+
region: Optional[str] = None,
|
|
96
113
|
) -> str:
|
|
97
114
|
"""
|
|
98
115
|
Parameters
|
|
99
116
|
----------
|
|
100
|
-
audience : Literal["pbi", "storage", "azure", "graph"] = "pbi") -> str
|
|
117
|
+
audience : Literal["pbi", "storage", "azure", "graph", "asazure", "keyvault"] = "pbi") -> str
|
|
101
118
|
Literal if it's for PBI/Fabric API call or OneLake/Storage Account call.
|
|
119
|
+
region : str, default=None
|
|
120
|
+
The region of the Azure Analysis Services. For example: 'westus2'.
|
|
102
121
|
"""
|
|
103
122
|
if audience == "pbi":
|
|
104
123
|
return self.credential.get_token(
|
|
@@ -114,12 +133,21 @@ class ServicePrincipalTokenProvider(TokenProvider):
|
|
|
114
133
|
return self.credential.get_token(
|
|
115
134
|
"https://graph.microsoft.com/.default"
|
|
116
135
|
).token
|
|
136
|
+
elif audience == "asazure":
|
|
137
|
+
return self.credential.get_token(
|
|
138
|
+
f"https://{region}.asazure.windows.net/.default"
|
|
139
|
+
).token
|
|
140
|
+
elif audience == "keyvault":
|
|
141
|
+
return self.credential.get_token("https://vault.azure.net/.default").token
|
|
117
142
|
else:
|
|
118
143
|
raise NotImplementedError
|
|
119
144
|
|
|
120
145
|
|
|
121
146
|
def _get_headers(
|
|
122
|
-
token_provider: str,
|
|
147
|
+
token_provider: str,
|
|
148
|
+
audience: Literal[
|
|
149
|
+
"pbi", "storage", "azure", "graph", "asazure", "keyvault"
|
|
150
|
+
] = "azure",
|
|
123
151
|
):
|
|
124
152
|
"""
|
|
125
153
|
Generates headers for an API request.
|
|
@@ -135,3 +163,51 @@ def _get_headers(
|
|
|
135
163
|
headers["Content-Type"] = "application/json"
|
|
136
164
|
|
|
137
165
|
return headers
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
token_provider = contextvars.ContextVar("token_provider", default=None)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
@log
|
|
172
|
+
@contextmanager
|
|
173
|
+
def service_principal_authentication(
|
|
174
|
+
key_vault_uri: str,
|
|
175
|
+
key_vault_tenant_id: str,
|
|
176
|
+
key_vault_client_id: str,
|
|
177
|
+
key_vault_client_secret: str,
|
|
178
|
+
):
|
|
179
|
+
"""
|
|
180
|
+
Establishes an authentication via Service Principal.
|
|
181
|
+
|
|
182
|
+
Parameters
|
|
183
|
+
----------
|
|
184
|
+
key_vault_uri : str
|
|
185
|
+
Azure Key Vault URI.
|
|
186
|
+
key_vault_tenant_id : str
|
|
187
|
+
Name of the secret in the Key Vault with the Fabric Tenant ID.
|
|
188
|
+
key_vault_client_id : str
|
|
189
|
+
Name of the secret in the Key Vault with the Service Principal Client ID.
|
|
190
|
+
key_vault_client_secret : str
|
|
191
|
+
Name of the secret in the Key Vault with the Service Principal Client Secret.
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
# Save the prior state
|
|
195
|
+
prior_token = token_provider.get()
|
|
196
|
+
|
|
197
|
+
# Set the new token_provider in a thread-safe manner
|
|
198
|
+
token_provider.set(
|
|
199
|
+
ServicePrincipalTokenProvider.from_azure_key_vault(
|
|
200
|
+
key_vault_uri=key_vault_uri,
|
|
201
|
+
key_vault_tenant_id=key_vault_tenant_id,
|
|
202
|
+
key_vault_client_id=key_vault_client_id,
|
|
203
|
+
key_vault_client_secret=key_vault_client_secret,
|
|
204
|
+
)
|
|
205
|
+
)
|
|
206
|
+
try:
|
|
207
|
+
yield
|
|
208
|
+
finally:
|
|
209
|
+
# Restore the prior state
|
|
210
|
+
if prior_token is None:
|
|
211
|
+
token_provider.set(None)
|
|
212
|
+
else:
|
|
213
|
+
token_provider.set(prior_token)
|