msfabricpysdkcore 0.0.3__py3-none-any.whl → 0.0.4__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/__init__.py +2 -1
- msfabricpysdkcore/admin_item.py +106 -0
- msfabricpysdkcore/admin_workspace.py +127 -0
- msfabricpysdkcore/adminapi.py +535 -0
- msfabricpysdkcore/capacity.py +3 -0
- msfabricpysdkcore/client.py +4 -318
- msfabricpysdkcore/coreapi.py +324 -0
- msfabricpysdkcore/domain.py +378 -0
- msfabricpysdkcore/item.py +3 -0
- msfabricpysdkcore/job_instance.py +3 -0
- msfabricpysdkcore/onelakeshortcut.py +3 -0
- msfabricpysdkcore/tests/test_admin_apis.py +69 -0
- msfabricpysdkcore/tests/test_domains.py +125 -0
- msfabricpysdkcore/tests/test_git.py +1 -1
- msfabricpysdkcore/tests/test_items_incl_lakehouse.py +1 -1
- msfabricpysdkcore/tests/test_jobs.py +1 -3
- msfabricpysdkcore/tests/test_shortcuts.py +1 -1
- msfabricpysdkcore/tests/test_workspaces_capacities.py +1 -1
- msfabricpysdkcore/workspace.py +3 -0
- {msfabricpysdkcore-0.0.3.dist-info → msfabricpysdkcore-0.0.4.dist-info}/METADATA +163 -15
- msfabricpysdkcore-0.0.4.dist-info/RECORD +28 -0
- msfabricpysdkcore-0.0.3.dist-info/RECORD +0 -21
- {msfabricpysdkcore-0.0.3.dist-info → msfabricpysdkcore-0.0.4.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.0.3.dist-info → msfabricpysdkcore-0.0.4.dist-info}/WHEEL +0 -0
- {msfabricpysdkcore-0.0.3.dist-info → msfabricpysdkcore-0.0.4.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.4
|
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
|
@@ -13,7 +13,7 @@ License-File: LICENSE
|
|
13
13
|
Requires-Dist: requests >=2.30.0
|
14
14
|
Requires-Dist: azure-identity >=1.15.0
|
15
15
|
|
16
|
-
#
|
16
|
+
# Python SDK for Microsoft Fabric
|
17
17
|
|
18
18
|
This is a Python SDK for Microsoft Fabric. It is a wrapper around the REST APIs (v1) of Fabric*.
|
19
19
|
|
@@ -34,17 +34,26 @@ Additionally it brings some extra features like:
|
|
34
34
|
|
35
35
|
See the latest release notes [here](releasenotes/release_notes.md).
|
36
36
|
|
37
|
-
Currently it supports all Core APIs and Lakehouse APIs, i.e.:
|
38
|
-
-
|
39
|
-
- [
|
40
|
-
- [
|
41
|
-
- [
|
42
|
-
-
|
43
|
-
-
|
44
|
-
- [
|
45
|
-
- [
|
46
|
-
|
47
|
-
|
37
|
+
Currently it supports all Core APIs, Admin APIs and Lakehouse APIs, i.e.:
|
38
|
+
- Core APIs
|
39
|
+
- [Capacities](#working-with-capacities)
|
40
|
+
- [Git](#working-with-git)
|
41
|
+
- [Items](#working-with-items)
|
42
|
+
- [Job Scheduler](#working-with-job-scheduler)
|
43
|
+
- Long Running Operations
|
44
|
+
- [OneLakeShortcuts](#working-with-one-lake-shortcuts)
|
45
|
+
- [Workspaces](#working-with-workspaces)
|
46
|
+
- Lakehouse APIs
|
47
|
+
- [Tables](#tables)
|
48
|
+
- Admin APIs
|
49
|
+
- [Domains](#admin-api-for-domains)
|
50
|
+
- [Items](#admin-api-for-items)
|
51
|
+
- [Tenants](#admin-api-for-tenants)
|
52
|
+
- [Users](#admin-api-for-users)
|
53
|
+
- [Workspaces](#admin-api-for-workspaces)
|
54
|
+
|
55
|
+
It is planned to support also the APIs of the user experiences and new APIs which are not released yet.
|
56
|
+
Also we have plans to support APIs to interact with Fabric capacities on the Azure Side.
|
48
57
|
Eventually Power BI APIs like the Scanner API will be covered as well.
|
49
58
|
|
50
59
|
*Because this SDK uses the API in the background, all limitations and restrictions of the API apply to this SDK as well. This includes rate limits, permissions, etc.
|
@@ -366,11 +375,13 @@ item.cancel_item_job_instance(job_instance_id="job_instance_id")
|
|
366
375
|
|
367
376
|
```
|
368
377
|
|
369
|
-
|
378
|
+
### Tables
|
379
|
+
|
370
380
|
|
371
|
-
# List tables in a Lakehouse
|
372
381
|
|
373
382
|
```python
|
383
|
+
# List tables in a Lakehouse
|
384
|
+
|
374
385
|
from msfabricpysdkcore import FabricClientCore
|
375
386
|
|
376
387
|
fc = FabricClientCore()
|
@@ -395,5 +406,142 @@ fc.load_table(workspace_id = "someworkspaceid", item_id = "someitemid", table_na
|
|
395
406
|
|
396
407
|
```
|
397
408
|
|
409
|
+
### Admin API for Workspaces
|
410
|
+
|
411
|
+
```python
|
412
|
+
from msfabricpysdkcore import FabricClientAdmin
|
413
|
+
|
414
|
+
fca = FabricClientAdmin()
|
415
|
+
|
416
|
+
|
417
|
+
# List workspaces
|
418
|
+
ws = fca.list_workspaces(name="testworkspace")[0]
|
419
|
+
|
420
|
+
# Get workspace
|
421
|
+
ws = fca.get_workspace(workspace_id="workspace_id")
|
422
|
+
|
423
|
+
# Get workspace access details
|
424
|
+
|
425
|
+
ws_access = fca.get_workspace_access_details("workspace_id")
|
426
|
+
# or
|
427
|
+
ws_access = ws.get_access_details()
|
428
|
+
```
|
429
|
+
|
430
|
+
### Admin API for Users
|
431
|
+
|
432
|
+
```python
|
433
|
+
from msfabricpysdkcore import FabricClientAdmin
|
434
|
+
|
435
|
+
fca = FabricClientAdmin()
|
436
|
+
|
437
|
+
# Get access entities
|
438
|
+
|
439
|
+
user_id = 'b4fuhaidc2'
|
440
|
+
access_entities = fca.get_access_entities(user_id, type="Notebook")
|
441
|
+
|
442
|
+
```
|
443
|
+
|
444
|
+
### Admin API for Tenants
|
445
|
+
|
446
|
+
```python
|
447
|
+
from msfabricpysdkcore import FabricClientAdmin
|
448
|
+
|
449
|
+
fca = FabricClientAdmin()
|
450
|
+
|
451
|
+
# Get tenant settings
|
452
|
+
|
453
|
+
tenant_settings = fca.get_tenant_settings()
|
454
|
+
|
455
|
+
# Get capacity tenant settings overrides
|
456
|
+
|
457
|
+
overrides = fca.get_capacities_tenant_settings_overrides()
|
458
|
+
|
459
|
+
```
|
460
|
+
|
461
|
+
### Admin API for Items
|
462
|
+
|
463
|
+
```python
|
464
|
+
from msfabricpysdkcore import FabricClientAdmin
|
465
|
+
|
466
|
+
fca = FabricClientAdmin()
|
467
|
+
|
468
|
+
# List items
|
469
|
+
|
470
|
+
item_list = fca.list_items(workspace_id="wsid")
|
471
|
+
|
472
|
+
# Get item
|
473
|
+
|
474
|
+
item = fca.get_item(workspace_id="wsid", item_id=item_list[0].id)
|
475
|
+
# or
|
476
|
+
item = ws.get_item(item_id=item_list[0].id)
|
477
|
+
|
478
|
+
# Get item access details
|
479
|
+
|
480
|
+
item_access = fca.get_item_access_details(workspace_id="wsid", item_id=item_list[0].id)
|
481
|
+
#or
|
482
|
+
item_access = ws.get_item_access_details(item_id=item_list[0].id)
|
483
|
+
# or
|
484
|
+
item_access = item.get_access_details()
|
485
|
+
|
486
|
+
```
|
487
|
+
|
488
|
+
### Admin API for Domains
|
489
|
+
|
490
|
+
```python
|
491
|
+
from msfabricpysdkcore import FabricClientAdmin
|
492
|
+
|
493
|
+
fca = FabricClientAdmin()
|
494
|
+
|
495
|
+
# Create domain
|
496
|
+
domain_name = "sdktestdomains"
|
497
|
+
domain = fca.create_domain(display_name=domain_name)
|
498
|
+
|
499
|
+
# Get domain by name
|
500
|
+
domain_clone = fca.get_domain_by_name(domain_name)
|
501
|
+
|
502
|
+
# Get domain by id
|
503
|
+
domain_clone = fca.get_domain_by_id(domain.id)
|
504
|
+
|
505
|
+
# List domains
|
506
|
+
domains = fca.list_domains()
|
507
|
+
|
508
|
+
# Update domain
|
509
|
+
domain_new_name = "sdktestdomains2"
|
510
|
+
domain_clone = fca.update_domain(domain.id, display_name=domain_new_name)
|
511
|
+
|
512
|
+
# Assign domain workspaces by Ids
|
513
|
+
fca.assign_domain_workspaces_by_ids(domain.id, ["workspace_id_1", "workspace_id_2"])
|
514
|
+
|
515
|
+
# List domain workspaces
|
516
|
+
workspaces = fca.list_domain_workspaces(domain.id, workspace_objects=True)
|
517
|
+
|
518
|
+
# Unassign domain workspaces by ids
|
519
|
+
status_code = fca.unassign_domain_workspaces_by_ids(domain.id, ["workspace_id_1", "workspace_id_2"])
|
520
|
+
|
521
|
+
# Assign domain workspaces by capacities
|
522
|
+
status_code = fca.assign_domain_workspaces_by_capacities(domain.id, ["cap_id1", "cap_id2"])
|
523
|
+
|
524
|
+
# Unassign all domain workspaces
|
525
|
+
status_code = fca.unassign_all_domain_workspaces(domain.id)
|
526
|
+
|
527
|
+
# Assign domain workspaces by principals
|
528
|
+
principal1 = {'id': '6edbsdfbfdgdf656', 'type': 'User'}
|
529
|
+
principal2 = {'id': '6eyxcbyyxc57', 'type': 'User'}
|
530
|
+
|
531
|
+
status_code = fca.assign_domains_workspaces_by_principals(domain.id, [principal1, principal2], wait_for_completion=True)
|
532
|
+
|
533
|
+
# Role assignments bulk assign
|
534
|
+
|
535
|
+
principals = [principal, principal_2]
|
536
|
+
status_code = fca.role_assignments_bulk_assign(domain.id, "Contributors", principals)
|
537
|
+
|
538
|
+
# Role assignments bulk unassign
|
539
|
+
status_code = fca.role_assignments_bulk_unassign(domain.id, "Contributors", [principal_2])
|
540
|
+
|
541
|
+
# Delete domain
|
542
|
+
status_code = fca.delete_domain(domain.id)
|
543
|
+
```
|
544
|
+
|
545
|
+
|
398
546
|
Note: This SDK is not an official SDK from Microsoft. It is a community project and not supported by Microsoft. Use it at your own risk.
|
399
547
|
Also the API is still in preview and might change. This SDK is not yet feature complete and might not cover all APIs yet. Feel free to contribute to this project to make it better.
|
@@ -0,0 +1,28 @@
|
|
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=1t5prgSg2hK7vMutif2lxHOQk_qTo3152h3FMof3y_4,1929
|
6
|
+
msfabricpysdkcore/capacity.py,sha256=Q_2-XrZtdf9F67fY0qU3D0ocEOGQq4KtIXAv9dXjQhI,1761
|
7
|
+
msfabricpysdkcore/client.py,sha256=XVa9xndx-b2f7rA8zR-9fXyon1Ig1MmSwIMNXDfUdhw,1060
|
8
|
+
msfabricpysdkcore/coreapi.py,sha256=uQLBgght07CcRZbliUORq-EN1SJYtLOSYWjX8jAo4wA,14367
|
9
|
+
msfabricpysdkcore/domain.py,sha256=i8jMJEutDRL5XuQ69woCVQEzLS_lm9uUxl4Kp3xtxHc,14722
|
10
|
+
msfabricpysdkcore/item.py,sha256=S_E6WzcY_zIAAmtsLh5n_r6ziOqn4916cZtk49tGceA,11155
|
11
|
+
msfabricpysdkcore/job_instance.py,sha256=EYruSPpBUP3NXz7oVecyrDwwD7g2u25i9UhteC6HFyU,2828
|
12
|
+
msfabricpysdkcore/lakehouse.py,sha256=phXIuKdW0khJMJx_BK2X3TJRPXSJ_9B1QKFnt2k7WH4,4011
|
13
|
+
msfabricpysdkcore/long_running_operation.py,sha256=PvrVEuasD9lwdJZ6ElsNwBE1G8xW5uDQ8zXcKqpOpXc,3021
|
14
|
+
msfabricpysdkcore/onelakeshortcut.py,sha256=EYZfP-rl60HdCqJD1O1NXrQTgrYTIw-EWisF4hs4bTU,2102
|
15
|
+
msfabricpysdkcore/workspace.py,sha256=_kgBmxPrqHxYN8U0OyzzmLcW-ecgFitOkyD0xhzjGcI,21544
|
16
|
+
msfabricpysdkcore/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
msfabricpysdkcore/tests/test_admin_apis.py,sha256=M-WWQBgOG03hobCEH3dTu9VkJzyFLLN-yE9A9sdsi_8,2062
|
18
|
+
msfabricpysdkcore/tests/test_domains.py,sha256=GJX5WA_pEMYzeOGB-GAml0vnnj5AZqa7akSZB-yeBeA,4649
|
19
|
+
msfabricpysdkcore/tests/test_git.py,sha256=6OERflBSYfJbdPYuHeTEtUl2ZVqiJERVY0Z1APt94_g,2398
|
20
|
+
msfabricpysdkcore/tests/test_items_incl_lakehouse.py,sha256=Hf_E2SRwwxT0MOO_T1YbRs8j-NJ_CxKbGktJgIHuz-U,2941
|
21
|
+
msfabricpysdkcore/tests/test_jobs.py,sha256=G3edmNO9FpRgaVnG3RR_MTtxfSTLhp05-HBKWsRNJF8,1581
|
22
|
+
msfabricpysdkcore/tests/test_shortcuts.py,sha256=2Y4R-PfzpqaD3fEsZ7gMYGCnMPZSlgsw7V4jxZHewdU,2390
|
23
|
+
msfabricpysdkcore/tests/test_workspaces_capacities.py,sha256=2VHPvZ8GnpFStgUoZ-Al3kVVVimjkAs9YG47NsFl-zo,6563
|
24
|
+
msfabricpysdkcore-0.0.4.dist-info/LICENSE,sha256=1NrGuF-zOmzbwzk3iI6lsP9koyDeKO1B0-8OD_tTvOQ,1156
|
25
|
+
msfabricpysdkcore-0.0.4.dist-info/METADATA,sha256=BAoWOWMQxH9w71RiJ0PHTDFG11TaePLnkZbmJTHt_h0,16186
|
26
|
+
msfabricpysdkcore-0.0.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
27
|
+
msfabricpysdkcore-0.0.4.dist-info/top_level.txt,sha256=3iRonu6ptDGQN4Yl6G76XGM7xbFNsskiEHW-P2gMQGY,18
|
28
|
+
msfabricpysdkcore-0.0.4.dist-info/RECORD,,
|
@@ -1,21 +0,0 @@
|
|
1
|
-
msfabricpysdkcore/__init__.py,sha256=HJeyM1aLgf9AvUGkU4Olky90YyySletA281VbSa0Q2c,36
|
2
|
-
msfabricpysdkcore/auth.py,sha256=1t5prgSg2hK7vMutif2lxHOQk_qTo3152h3FMof3y_4,1929
|
3
|
-
msfabricpysdkcore/capacity.py,sha256=PD089m34I0BEXGTzLsF0VfLVDp6sixyDR_uUfQvwV8k,1696
|
4
|
-
msfabricpysdkcore/client.py,sha256=j2X3VO44mbB2YW0UNPHoArHl6GE54KS7LsFWFD_F0o0,15047
|
5
|
-
msfabricpysdkcore/item.py,sha256=654cssmSKmhCF-scNH8J8TQLB_fVP2oRU8aAAU7zJF0,11086
|
6
|
-
msfabricpysdkcore/job_instance.py,sha256=Rjv2u1XXMPVew-9gGFQLrnhzXmYfzlO9SeUvA19DDTI,2759
|
7
|
-
msfabricpysdkcore/lakehouse.py,sha256=phXIuKdW0khJMJx_BK2X3TJRPXSJ_9B1QKFnt2k7WH4,4011
|
8
|
-
msfabricpysdkcore/long_running_operation.py,sha256=PvrVEuasD9lwdJZ6ElsNwBE1G8xW5uDQ8zXcKqpOpXc,3021
|
9
|
-
msfabricpysdkcore/onelakeshortcut.py,sha256=20AZJ79v7FvgKLYbJi0BIaawi6qMjnhqUTIlniwnVBI,2033
|
10
|
-
msfabricpysdkcore/workspace.py,sha256=8LJeKwKetm9ASsN19a5C5AU3O2cjR1kWtigxdBKGu0E,21475
|
11
|
-
msfabricpysdkcore/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
msfabricpysdkcore/tests/test_git.py,sha256=jrbPu5CNdwbnnbLIQv7Z7hdwXzsZuv3tYG92qBy6_U4,2397
|
13
|
-
msfabricpysdkcore/tests/test_items_incl_lakehouse.py,sha256=QT-4saUpIN5AXhY3_A1uIGytlQ6yLcTzPoT11L6IhyE,2940
|
14
|
-
msfabricpysdkcore/tests/test_jobs.py,sha256=ee6Dsi1YsBQpF0jESY6yNBbjwB-5OOhIcBGG_d4rId4,1643
|
15
|
-
msfabricpysdkcore/tests/test_shortcuts.py,sha256=A7KxKXIRVVavzz9CPcNMJg3SWlnfozYOBZuI1u4GVIg,2389
|
16
|
-
msfabricpysdkcore/tests/test_workspaces_capacities.py,sha256=-IeQ6trY2lkgfzuQhoTGtrj07tFlxkStJKN_xaHCJT0,6562
|
17
|
-
msfabricpysdkcore-0.0.3.dist-info/LICENSE,sha256=1NrGuF-zOmzbwzk3iI6lsP9koyDeKO1B0-8OD_tTvOQ,1156
|
18
|
-
msfabricpysdkcore-0.0.3.dist-info/METADATA,sha256=WsTSN8Gd8zVGsrBiN5CI9VWx-SWOLBIutvuOSuUMZJg,12513
|
19
|
-
msfabricpysdkcore-0.0.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
20
|
-
msfabricpysdkcore-0.0.3.dist-info/top_level.txt,sha256=3iRonu6ptDGQN4Yl6G76XGM7xbFNsskiEHW-P2gMQGY,18
|
21
|
-
msfabricpysdkcore-0.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|