msfabricpysdkcore 0.0.9__py3-none-any.whl → 0.0.10__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.
- msfabricpysdkcore/admin_item.py +7 -0
- msfabricpysdkcore/admin_workspace.py +20 -1
- msfabricpysdkcore/adminapi.py +133 -7
- msfabricpysdkcore/coreapi.py +299 -15
- msfabricpysdkcore/deployment_pipeline.py +240 -0
- msfabricpysdkcore/environment.py +222 -0
- msfabricpysdkcore/item.py +11 -7
- msfabricpysdkcore/lakehouse.py +42 -1
- msfabricpysdkcore/long_running_operation.py +2 -6
- msfabricpysdkcore/otheritems.py +90 -3
- msfabricpysdkcore/spark_custom_pool.py +118 -0
- msfabricpysdkcore/tests/test_admin_apis.py +20 -9
- msfabricpysdkcore/tests/test_deployment_pipeline.py +64 -0
- msfabricpysdkcore/tests/test_domains.py +3 -2
- msfabricpysdkcore/tests/test_environments.py +48 -0
- msfabricpysdkcore/tests/test_git.py +3 -1
- msfabricpysdkcore/tests/test_items_incl_lakehouse.py +72 -12
- msfabricpysdkcore/tests/test_jobs.py +4 -0
- msfabricpysdkcore/tests/test_shortcuts.py +3 -1
- msfabricpysdkcore/tests/test_spark.py +91 -0
- msfabricpysdkcore/tests/test_workspaces_capacities.py +2 -1
- msfabricpysdkcore/workspace.py +291 -16
- {msfabricpysdkcore-0.0.9.dist-info → msfabricpysdkcore-0.0.10.dist-info}/METADATA +82 -32
- msfabricpysdkcore-0.0.10.dist-info/RECORD +35 -0
- msfabricpysdkcore-0.0.9.dist-info/RECORD +0 -29
- {msfabricpysdkcore-0.0.9.dist-info → msfabricpysdkcore-0.0.10.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.0.9.dist-info → msfabricpysdkcore-0.0.10.dist-info}/WHEEL +0 -0
- {msfabricpysdkcore-0.0.9.dist-info → msfabricpysdkcore-0.0.10.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: msfabricpysdkcore
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.10
|
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
|
@@ -37,22 +37,24 @@ See the latest release notes [here](releasenotes/release_notes.md).
|
|
37
37
|
Currently it supports all Core APIs, Admin APIs, Lakehouse APIs and all other item specific CRUD APIs, i.e.:
|
38
38
|
- Core APIs
|
39
39
|
- [Capacities](#working-with-capacities)
|
40
|
+
- [Deployment Pipelines](#deployment-pipelines)
|
40
41
|
- [Git](#working-with-git)
|
41
42
|
- [Items](#working-with-items)
|
42
43
|
- [Job Scheduler](#working-with-job-scheduler)
|
43
|
-
- Long Running Operations
|
44
|
+
- [Long Running Operations](#long-running-operations)
|
44
45
|
- [OneLakeShortcuts](#working-with-one-lake-shortcuts)
|
45
46
|
- [Workspaces](#working-with-workspaces)
|
46
|
-
- Lakehouse APIs
|
47
|
-
- [Tables](#tables)
|
48
47
|
- Admin APIs
|
49
48
|
- [Domains](#admin-api-for-domains)
|
50
49
|
- [Items](#admin-api-for-items)
|
50
|
+
- [Labels](#admin-api-for-labels)
|
51
51
|
- [Tenants](#admin-api-for-tenants)
|
52
52
|
- [Users](#admin-api-for-users)
|
53
53
|
- [Workspaces](#admin-api-for-workspaces)
|
54
|
-
- [Item Specific
|
54
|
+
- [Item Specific APIs](item_specific_apis.md), e.g.
|
55
55
|
- List, create, update, delete warehouses, notebooks, semantic models, kql databases,.....
|
56
|
+
- Lakehouse operations (Load table, list tables, run table maintenance)
|
57
|
+
- Spark Pool operations
|
56
58
|
|
57
59
|
It is planned to support also new APIs which are not released yet.
|
58
60
|
Also we have plans to support APIs to interact with Fabric capacities on the Azure Side.
|
@@ -194,6 +196,45 @@ ws.unassign_from_capacity()
|
|
194
196
|
fc.list_capacities()
|
195
197
|
```
|
196
198
|
|
199
|
+
### Deployment Pipelines
|
200
|
+
|
201
|
+
```python
|
202
|
+
|
203
|
+
|
204
|
+
# List deployment pipelines
|
205
|
+
|
206
|
+
depl_pipes = fc.list_deployment_pipelines()
|
207
|
+
|
208
|
+
pipe = [pipe for pipe in depl_pipes if pipe.display_name == 'sdkpipe'][0]
|
209
|
+
pipe_id = pipe.id
|
210
|
+
|
211
|
+
# Get a deployment pipeline
|
212
|
+
pipe = fc.get_deployment_pipeline(pipe_id)
|
213
|
+
|
214
|
+
|
215
|
+
# Get deployment pipeline stages
|
216
|
+
stages = fc.get_deployment_pipeline_stages(pipe_id)
|
217
|
+
|
218
|
+
names = [stage.display_name for stage in stages]
|
219
|
+
|
220
|
+
dev_stage = [stage for stage in stages if stage.display_name == "Development"][0]
|
221
|
+
prod_stage = [stage for stage in stages if stage.display_name == "Production"][0]
|
222
|
+
|
223
|
+
# Get deployment pipeline stages items
|
224
|
+
items = fc.get_deployment_pipeline_stages_items(pipeline_id=pipe_id, stage_id=dev_stage.id)
|
225
|
+
|
226
|
+
|
227
|
+
items = [item for item in dev_stage.get_items() if item["itemDisplayName"] == 'cicdlakehouse']
|
228
|
+
item = items[0]
|
229
|
+
item = {"sourceItemId": item["itemId"],
|
230
|
+
"itemType": item["itemType"]}
|
231
|
+
items = [item]
|
232
|
+
|
233
|
+
# Deploy stage content
|
234
|
+
response = pipe.deploy(source_stage_id=dev_stage.id,target_stage_id=prod_stage.id, items=items)
|
235
|
+
|
236
|
+
```
|
237
|
+
|
197
238
|
### Working with items
|
198
239
|
|
199
240
|
```python
|
@@ -380,37 +421,24 @@ item.cancel_item_job_instance(job_instance_id="job_instance_id")
|
|
380
421
|
|
381
422
|
```
|
382
423
|
|
383
|
-
### Tables
|
384
|
-
|
385
424
|
|
425
|
+
### Long Running Operations
|
386
426
|
|
387
427
|
```python
|
388
|
-
# List tables in a Lakehouse
|
389
428
|
|
390
|
-
|
429
|
+
# Get the state of an operation
|
391
430
|
|
392
|
-
|
393
|
-
ws = fc.get_workspace_by_name("testworkspace")
|
394
|
-
lakehouse = ws.get_item_by_name(item_name="lakehouse1", item_type="Lakehouse")
|
395
|
-
table_list = lakehouse.list_tables()
|
396
|
-
# or
|
397
|
-
table_list = ws.list_tables(item_id = "someitemid")
|
398
|
-
# or
|
399
|
-
table_list = fc.list_tables(workspace_id = "someworkspaceid", item_id = "someitemid")
|
431
|
+
operation_id = "801783df0123gsdgsq80"
|
400
432
|
|
433
|
+
state = fc.get_operation_state(operation_id)
|
401
434
|
|
402
|
-
#
|
435
|
+
# Get the results of an operation
|
403
436
|
|
404
|
-
|
405
|
-
# or
|
406
|
-
ws.load_table(item_id = "someitemid", table_name="testtable",
|
407
|
-
path_type= "File", relative_path="Files/folder1/titanic.csv")
|
408
|
-
# or
|
409
|
-
fc.load_table(workspace_id = "someworkspaceid", item_id = "someitemid", table_name="testtable",
|
410
|
-
path_type= "File", relative_path="Files/folder1/titanic.csv")
|
437
|
+
results = fc.get_operation_results(operation_id)
|
411
438
|
|
412
439
|
```
|
413
440
|
|
441
|
+
|
414
442
|
### Admin API for Workspaces
|
415
443
|
|
416
444
|
```python
|
@@ -427,9 +455,9 @@ ws = fca.get_workspace(workspace_id="workspace_id")
|
|
427
455
|
|
428
456
|
# Get workspace access details
|
429
457
|
|
430
|
-
ws_access = fca.
|
458
|
+
ws_access = fca.list_workspace_access_details("workspace_id")
|
431
459
|
# or
|
432
|
-
ws_access = ws.
|
460
|
+
ws_access = ws.list_access_details()
|
433
461
|
```
|
434
462
|
|
435
463
|
### Admin API for Users
|
@@ -442,7 +470,7 @@ fca = FabricClientAdmin()
|
|
442
470
|
# Get access entities
|
443
471
|
|
444
472
|
user_id = 'b4fuhaidc2'
|
445
|
-
access_entities = fca.
|
473
|
+
access_entities = fca.list_access_entities(user_id, type="Notebook")
|
446
474
|
|
447
475
|
```
|
448
476
|
|
@@ -455,11 +483,11 @@ fca = FabricClientAdmin()
|
|
455
483
|
|
456
484
|
# Get tenant settings
|
457
485
|
|
458
|
-
tenant_settings = fca.
|
486
|
+
tenant_settings = fca.list_tenant_settings()
|
459
487
|
|
460
488
|
# Get capacity tenant settings overrides
|
461
489
|
|
462
|
-
overrides = fca.
|
490
|
+
overrides = fca.list_capacities_tenant_settings_overrides()
|
463
491
|
|
464
492
|
```
|
465
493
|
|
@@ -482,14 +510,36 @@ item = ws.get_item(item_id=item_list[0].id)
|
|
482
510
|
|
483
511
|
# Get item access details
|
484
512
|
|
485
|
-
item_access = fca.
|
513
|
+
item_access = fca.list_item_access_details(workspace_id="wsid", item_id=item_list[0].id)
|
486
514
|
#or
|
487
|
-
item_access = ws.
|
515
|
+
item_access = ws.list_item_access_details(item_id=item_list[0].id)
|
488
516
|
# or
|
489
517
|
item_access = item.get_access_details()
|
490
518
|
|
491
519
|
```
|
492
520
|
|
521
|
+
### Admin API for Labels
|
522
|
+
|
523
|
+
```python
|
524
|
+
|
525
|
+
from msfabricpysdkcore import FabricClientAdmin
|
526
|
+
|
527
|
+
fca = FabricClientAdmin()
|
528
|
+
|
529
|
+
items = [{"id": "d417b843534cf0-23423523", "type": "Lakehouse"}]
|
530
|
+
label_id = "de8912714345d2" # to be found in Microsoft Purview Compliance Center
|
531
|
+
|
532
|
+
# Bulk set labels
|
533
|
+
|
534
|
+
resp = fca.bulk_set_labels(items=items, label_id=label_id)
|
535
|
+
|
536
|
+
# Bulk remove labels
|
537
|
+
|
538
|
+
resp = fca.bulk_remove_labels(items=items)
|
539
|
+
|
540
|
+
```
|
541
|
+
|
542
|
+
|
493
543
|
### Admin API for Domains
|
494
544
|
|
495
545
|
```python
|
@@ -0,0 +1,35 @@
|
|
1
|
+
msfabricpysdkcore/__init__.py,sha256=nh8-lxdMBWYSbQpbRxWkn3ZRpGipmQplTudjskN2l88,78
|
2
|
+
msfabricpysdkcore/admin_item.py,sha256=OGVfMMqAKy80Ukp8TJnpXoRq8WbWX7Qq1hz7tmfiUBU,4020
|
3
|
+
msfabricpysdkcore/admin_workspace.py,sha256=RctVsXZ57ppiybua69BW_yVpUbrGic6fYOjFPZFPAzA,4862
|
4
|
+
msfabricpysdkcore/adminapi.py,sha256=uithaYq_HWDU-9Et_EFBNQfrjcjnI-NW6OCmWoAsZxk,25649
|
5
|
+
msfabricpysdkcore/auth.py,sha256=zOU3viJwwYZMefS2yWJZ_LaOePJY8mRRrACIlp0yRkw,2430
|
6
|
+
msfabricpysdkcore/capacity.py,sha256=Q_2-XrZtdf9F67fY0qU3D0ocEOGQq4KtIXAv9dXjQhI,1761
|
7
|
+
msfabricpysdkcore/client.py,sha256=W8J5VR19e6N__ycLvFALo-IHWDznGr5s7YD6e9jC4bE,1197
|
8
|
+
msfabricpysdkcore/coreapi.py,sha256=TKnxpki4gKmySF4LP8qwveZcZXvbeVWkt0lTcg8hXDI,46168
|
9
|
+
msfabricpysdkcore/deployment_pipeline.py,sha256=RFI86rtG-eTpV-_tVl3cXtcTl9ekRvOI5fLsXo9CMVA,9739
|
10
|
+
msfabricpysdkcore/domain.py,sha256=i8jMJEutDRL5XuQ69woCVQEzLS_lm9uUxl4Kp3xtxHc,14722
|
11
|
+
msfabricpysdkcore/environment.py,sha256=nvBNvmgqQMGWRUhZ9oX0z5Xf8IfPqyRr7ufgsiYt6dY,10271
|
12
|
+
msfabricpysdkcore/item.py,sha256=Ac24M--C5N5Q0Rny70DVMctRSd8kG3qI-RcvlIWCNrw,11516
|
13
|
+
msfabricpysdkcore/job_instance.py,sha256=C9kKsV-BIJSeU6DfoTnLlg4DLp-8RYpovs0A-mKwi4o,2745
|
14
|
+
msfabricpysdkcore/lakehouse.py,sha256=nv95SBz_jsssT5dEw622WqtDHUyh5bFFsVTwiqo8s-c,6055
|
15
|
+
msfabricpysdkcore/long_running_operation.py,sha256=gcGVTgA0NToPItrl42Zy1M2eVZtx-vx-SdUryNAm53E,2731
|
16
|
+
msfabricpysdkcore/onelakeshortcut.py,sha256=EYZfP-rl60HdCqJD1O1NXrQTgrYTIw-EWisF4hs4bTU,2102
|
17
|
+
msfabricpysdkcore/otheritems.py,sha256=6A9PC5ObENeTKE3Pc8klYRxSrx-TwQUMq_P1eLFPF2A,9314
|
18
|
+
msfabricpysdkcore/spark_custom_pool.py,sha256=2H-GkGcDsiKxSpXFSf8Zi7xJI5_krb_8sGdF5vDjEy8,4635
|
19
|
+
msfabricpysdkcore/workspace.py,sha256=4ZRyRm5pm9aKedURiGhRsh-gm63NxNxmvjDGg0cA0go,61716
|
20
|
+
msfabricpysdkcore/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
+
msfabricpysdkcore/tests/test_admin_apis.py,sha256=HTXt72p9FiEf3q9SXyq9aImR6zZo_xIREfB0xPaYazU,2586
|
22
|
+
msfabricpysdkcore/tests/test_deployment_pipeline.py,sha256=XmqKZXbwBY3P-4O_ce9Wupz9qXHaKxWERwS-RZt38Bs,2024
|
23
|
+
msfabricpysdkcore/tests/test_domains.py,sha256=KFGQyl0G2v4JjX_xYHY-vPSjYxeLEx3AcXMdiRZzClc,4620
|
24
|
+
msfabricpysdkcore/tests/test_environments.py,sha256=kuEXk9uKOYOQ5YWrlk6hWQWHm176zFP0AoDz3EOV6Oo,1592
|
25
|
+
msfabricpysdkcore/tests/test_git.py,sha256=IZfWggCyZtHpUbYyacNTyIRfy6rofz-fBEmco_8gMZ4,2415
|
26
|
+
msfabricpysdkcore/tests/test_items_incl_lakehouse.py,sha256=5fJZf3qqx9yyPsZ-lv5iaTJWnEuJHL39YdFos4ThEoA,23303
|
27
|
+
msfabricpysdkcore/tests/test_jobs.py,sha256=DC1nQTav_Re7uunRA07wD_56giLqe9KOsgm56Il8Zr4,1632
|
28
|
+
msfabricpysdkcore/tests/test_shortcuts.py,sha256=TqGLzEWsDyiQ0Gf6JpT_qBHUCgcvYXfVwpXxOay7Qz4,2407
|
29
|
+
msfabricpysdkcore/tests/test_spark.py,sha256=5BCAgHRiuXjIRnGrbvNNh9emq0VyZXlvIWgWAEir5ZQ,3437
|
30
|
+
msfabricpysdkcore/tests/test_workspaces_capacities.py,sha256=2VHPvZ8GnpFStgUoZ-Al3kVVVimjkAs9YG47NsFl-zo,6563
|
31
|
+
msfabricpysdkcore-0.0.10.dist-info/LICENSE,sha256=1NrGuF-zOmzbwzk3iI6lsP9koyDeKO1B0-8OD_tTvOQ,1156
|
32
|
+
msfabricpysdkcore-0.0.10.dist-info/METADATA,sha256=7EPpvWLRc5tXpMQIdAByGXRkT4dF592UEhwoPqruPXY,17455
|
33
|
+
msfabricpysdkcore-0.0.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
34
|
+
msfabricpysdkcore-0.0.10.dist-info/top_level.txt,sha256=3iRonu6ptDGQN4Yl6G76XGM7xbFNsskiEHW-P2gMQGY,18
|
35
|
+
msfabricpysdkcore-0.0.10.dist-info/RECORD,,
|
@@ -1,29 +0,0 @@
|
|
1
|
-
msfabricpysdkcore/__init__.py,sha256=nh8-lxdMBWYSbQpbRxWkn3ZRpGipmQplTudjskN2l88,78
|
2
|
-
msfabricpysdkcore/admin_item.py,sha256=YfZiNAwqojwxSLsHXmYG_uO6_ILIQqLsOVh79HeWsuw,3778
|
3
|
-
msfabricpysdkcore/admin_workspace.py,sha256=OtBI7EWOa44rgIdIDG9dU2l-nMRYpOeIaoP5BPHKUPA,4248
|
4
|
-
msfabricpysdkcore/adminapi.py,sha256=YzK3s-CoFkzwOXrWPxoUeXFpv16ZwNujieaZI63bhqI,21039
|
5
|
-
msfabricpysdkcore/auth.py,sha256=zOU3viJwwYZMefS2yWJZ_LaOePJY8mRRrACIlp0yRkw,2430
|
6
|
-
msfabricpysdkcore/capacity.py,sha256=Q_2-XrZtdf9F67fY0qU3D0ocEOGQq4KtIXAv9dXjQhI,1761
|
7
|
-
msfabricpysdkcore/client.py,sha256=W8J5VR19e6N__ycLvFALo-IHWDznGr5s7YD6e9jC4bE,1197
|
8
|
-
msfabricpysdkcore/coreapi.py,sha256=PhcCP2JaR5-1FGHhgHKwb0sUFECi9iQ0BPe_Jewb3nE,32048
|
9
|
-
msfabricpysdkcore/domain.py,sha256=i8jMJEutDRL5XuQ69woCVQEzLS_lm9uUxl4Kp3xtxHc,14722
|
10
|
-
msfabricpysdkcore/item.py,sha256=NTWekAjo9YJUapH1F4E3x-jRJoEzQwOuq9Ya2JEt54w,11570
|
11
|
-
msfabricpysdkcore/job_instance.py,sha256=C9kKsV-BIJSeU6DfoTnLlg4DLp-8RYpovs0A-mKwi4o,2745
|
12
|
-
msfabricpysdkcore/lakehouse.py,sha256=7LXYNoN5kfiaUkoXOMVsa5fgDgFf-6qTHsld3OKHLDs,3928
|
13
|
-
msfabricpysdkcore/long_running_operation.py,sha256=Vy2ESejnTIt66AtSUhMDlNRb5i_E92V8lHKKjl6Xosk,2848
|
14
|
-
msfabricpysdkcore/onelakeshortcut.py,sha256=EYZfP-rl60HdCqJD1O1NXrQTgrYTIw-EWisF4hs4bTU,2102
|
15
|
-
msfabricpysdkcore/otheritems.py,sha256=nJKOkvbemw6GYEICxmdDJeK5Swf0kHNci0krTo41a6k,3834
|
16
|
-
msfabricpysdkcore/workspace.py,sha256=tOzinHkr5Irj6U7uJkQbXtIktj1TQmu_YXZfPv3nMFw,48660
|
17
|
-
msfabricpysdkcore/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
msfabricpysdkcore/tests/test_admin_apis.py,sha256=9tIknq_a2RXy4mU1tYQXmMmZlmFrtYQhCQjN0a2dRv8,2048
|
19
|
-
msfabricpysdkcore/tests/test_domains.py,sha256=pmdCTjd8zUDll0fjsoYUvqgfq0n4CpVBdyzw-7L3Glw,4635
|
20
|
-
msfabricpysdkcore/tests/test_git.py,sha256=qqnOYM373hx8fb36ME98Jl-rhGK6cC_nIUjflFvtkUo,2399
|
21
|
-
msfabricpysdkcore/tests/test_items_incl_lakehouse.py,sha256=tIEXvkeMjd3QlPxVrumRLghndYYzEdk1SIZSRPp2ilo,21185
|
22
|
-
msfabricpysdkcore/tests/test_jobs.py,sha256=G3edmNO9FpRgaVnG3RR_MTtxfSTLhp05-HBKWsRNJF8,1581
|
23
|
-
msfabricpysdkcore/tests/test_shortcuts.py,sha256=BZKIQxkYrlnsqCgEIHqqTBszOnUWyTg_k20DueKZB-I,2391
|
24
|
-
msfabricpysdkcore/tests/test_workspaces_capacities.py,sha256=WWHlSL8yMTfBer8QoOpsgQFuvIOb3xroVd3oaJpf3X8,6549
|
25
|
-
msfabricpysdkcore-0.0.9.dist-info/LICENSE,sha256=1NrGuF-zOmzbwzk3iI6lsP9koyDeKO1B0-8OD_tTvOQ,1156
|
26
|
-
msfabricpysdkcore-0.0.9.dist-info/METADATA,sha256=e4wS-QqGgHZAEKewmN2QrMbDVdzIovJt8-rESB6hmVg,16445
|
27
|
-
msfabricpysdkcore-0.0.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
28
|
-
msfabricpysdkcore-0.0.9.dist-info/top_level.txt,sha256=3iRonu6ptDGQN4Yl6G76XGM7xbFNsskiEHW-P2gMQGY,18
|
29
|
-
msfabricpysdkcore-0.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|