pvw-cli 1.0.9__py3-none-any.whl → 1.0.11__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 pvw-cli might be problematic. Click here for more details.

@@ -9,7 +9,7 @@ from .endpoints import ENDPOINTS, format_endpoint, get_api_version_params
9
9
  class Workflow(Endpoint):
10
10
  def __init__(self):
11
11
  Endpoint.__init__(self)
12
- self.app = 'workflow'
12
+ self.app = 'datagovernance' # Use datagovernance for workflow endpoints
13
13
 
14
14
  # ========== Workflow Management ==========
15
15
 
@@ -17,8 +17,8 @@ class Workflow(Endpoint):
17
17
  def workflowListWorkflows(self, args):
18
18
  """List all workflows"""
19
19
  self.method = 'GET'
20
- self.endpoint = ENDPOINTS['workflow']['list_workflows']
21
- self.params = get_api_version_params('workflow')
20
+ self.endpoint = '/datagovernance/dataaccess/workflows'
21
+ self.params = {}
22
22
 
23
23
  @decorator
24
24
  def workflowCreateWorkflow(self, args):
@@ -37,6 +37,21 @@ def get_data(http_dict):
37
37
  client = SyncPurviewClient(config)
38
38
 
39
39
  # Make the request
40
+ # If debug enabled via PURVIEWCLI_DEBUG env var, print helpful diagnostics
41
+ debug = os.getenv("PURVIEWCLI_DEBUG")
42
+ if debug:
43
+ try:
44
+ base_info = {
45
+ "app": http_dict.get("app"),
46
+ "method": http_dict.get("method", "GET"),
47
+ "endpoint": http_dict.get("endpoint", "/"),
48
+ "params": http_dict.get("params"),
49
+ "payload": http_dict.get("payload"),
50
+ }
51
+ print("[PURVIEWCLI DEBUG] Request:", json.dumps(base_info, default=str, indent=2))
52
+ except Exception:
53
+ print("[PURVIEWCLI DEBUG] Request: (could not serialize request info)")
54
+
40
55
  result = client.make_request(
41
56
  method=http_dict.get("method", "GET"),
42
57
  endpoint=http_dict.get("endpoint", "/"),
@@ -44,6 +59,12 @@ def get_data(http_dict):
44
59
  json=http_dict.get("payload"),
45
60
  )
46
61
 
62
+ if debug:
63
+ try:
64
+ print("[PURVIEWCLI DEBUG] Response:", json.dumps(result, default=str, indent=2))
65
+ except Exception:
66
+ print("[PURVIEWCLI DEBUG] Response: (could not serialize response)")
67
+
47
68
  # The synchronous client returns a wrapper dict like
48
69
  # {"status": "success", "data": <json>, "status_code": 200}
49
70
  # Normalize to return the raw JSON payload when available so
@@ -113,8 +113,13 @@ class SyncPurviewClient:
113
113
  def make_request(self, method: str, endpoint: str, **kwargs) -> Dict:
114
114
  """Make actual HTTP request to Microsoft Purview"""
115
115
  try:
116
- # Determine if this is a Unified Catalog request
117
- is_unified_catalog = endpoint.startswith('/datagovernance/catalog')
116
+ # Determine if this is a Unified Catalog / Data Map (Atlas) request
117
+ # Several endpoints use '/catalog' or '/datamap' prefixes (Atlas/DataMap APIs)
118
+ is_unified_catalog = (
119
+ endpoint.startswith('/datagovernance/catalog')
120
+ or endpoint.startswith('/catalog')
121
+ or endpoint.startswith('/datamap')
122
+ )
118
123
 
119
124
  # Get the appropriate authentication token and base URL
120
125
  if is_unified_catalog:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pvw-cli
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: Microsoft Purview CLI with comprehensive automation capabilities
5
5
  Author-email: AYOUB KEBAILI <keayoub@msn.com>
6
6
  Maintainer-email: AYOUB KEBAILI <keayoub@msn.com>
@@ -27,19 +27,15 @@ Classifier: Topic :: Database
27
27
  Classifier: Topic :: Internet :: WWW/HTTP
28
28
  Requires-Python: >=3.8
29
29
  Description-Content-Type: text/markdown
30
- Requires-Dist: click>=8.0.0
31
- Requires-Dist: rich>=12.0.0
32
30
  Requires-Dist: azure-identity>=1.12.0
33
31
  Requires-Dist: azure-core>=1.24.0
32
+ Requires-Dist: click>=8.0.0
33
+ Requires-Dist: rich>=12.0.0
34
34
  Requires-Dist: requests>=2.28.0
35
35
  Requires-Dist: pandas>=1.5.0
36
36
  Requires-Dist: aiohttp>=3.8.0
37
37
  Requires-Dist: pydantic<3.0.0,>=1.10.0
38
- Requires-Dist: typer>=0.7.0
39
38
  Requires-Dist: PyYAML>=6.0
40
- Requires-Dist: python-dotenv>=0.19.0
41
- Requires-Dist: asyncio-throttle>=1.0.0
42
- Requires-Dist: tabulate>=0.9.0
43
39
  Requires-Dist: cryptography<46.0.0,>=41.0.5
44
40
  Provides-Extra: dev
45
41
  Requires-Dist: pytest>=7.0.0; extra == "dev"
@@ -60,21 +56,24 @@ Requires-Dist: pytest-asyncio>=0.20.0; extra == "test"
60
56
  Requires-Dist: pytest-cov>=4.0.0; extra == "test"
61
57
  Requires-Dist: requests-mock>=1.9.0; extra == "test"
62
58
 
63
- # PURVIEW CLI v1.0.9 - Microsoft Purview Automation & Data Governance
59
+ # PURVIEW CLI v1.0.11 - Microsoft Purview Automation & Data Governance
64
60
 
65
- > **LATEST UPDATE (September 2025):**
61
+ > **LATEST UPDATE (October 2025):**
62
+ > - **🚀 NEW: Complete Data Product CRUD Operations** - Full update and delete support with smart partial updates
63
+ > - **🏥 NEW: Health Monitoring API** - Automated governance health checks and recommendations
64
+ > - **🔄 NEW: Workflow Management** - Approval workflows and business process automation
65
+ > - **✨ Enhanced ID Display** - Full UUIDs now visible in all list commands (no truncation)
66
66
  > - **🚀 MAJOR: Complete Microsoft Purview Unified Catalog (UC) Support** (see new `uc` command group)
67
67
  > - Full governance domains, glossary terms, data products, OKRs, and critical data elements management
68
68
  > - Feature parity with UnifiedCatalogPy project with enhanced CLI experience
69
69
  > - Advanced Data Product Management (legacy `data-product` command group)
70
70
  > - Enhanced Discovery Query/Search support
71
- > - **Fixed all command examples to use correct `pvw` command**
72
71
 
73
72
  ---
74
73
 
75
74
  ## What is PVW CLI?
76
75
 
77
- **PVW CLI v1.0.9** is a modern, full-featured command-line interface and Python library for Microsoft Purview. It enables automation and management of *all major Purview APIs* including:
76
+ **PVW CLI v1.0.11** is a modern, full-featured command-line interface and Python library for Microsoft Purview. It enables automation and management of *all major Purview APIs* including:
78
77
 
79
78
  - **NEW Unified Catalog (UC) Management** - Complete governance domains, glossary terms, data products, OKRs, CDEs (NEW)
80
79
  - Entity management (create, update, bulk, import/export)
@@ -142,7 +141,7 @@ For more advanced usage, see the sections below or visit the [documentation](htt
142
141
 
143
142
  ## Overview
144
143
 
145
- **PVW CLI v1.0.9** is a modern command-line interface and Python library for Microsoft Purview, enabling:
144
+ **PVW CLI v1.0.11** is a modern command-line interface and Python library for Microsoft Purview, enabling:
146
145
 
147
146
  - Advanced data catalog search and discovery
148
147
  - Bulk import/export of entities, glossary terms, and lineage
@@ -553,23 +552,31 @@ pvw uc dataproduct create \
553
552
  --name "Customer Analytics Dashboard" \
554
553
  --domain-id "abc-123" \
555
554
  --description "360-degree customer analytics with behavioral insights" \
556
- --owner "data-team@company.com"
555
+ --type Analytical \
556
+ --status Draft
557
557
 
558
558
  # Get detailed data product information
559
- pvw uc dataproduct get --product-id "prod-789" --domain-id "abc-123"
559
+ pvw uc dataproduct show --product-id "prod-789"
560
560
 
561
- # Update data product metadata
561
+ # Update data product (partial updates supported - only specify fields to change)
562
562
  pvw uc dataproduct update \
563
563
  --product-id "prod-789" \
564
- --domain-id "abc-123" \
565
- --status "active" \
566
- --version "v2.1.0"
564
+ --status Published \
565
+ --description "Updated comprehensive customer analytics" \
566
+ --endorsed
567
567
 
568
- # Add data assets to a data product
569
- pvw uc dataproduct add-asset \
568
+ # Update multiple fields at once
569
+ pvw uc dataproduct update \
570
570
  --product-id "prod-789" \
571
- --domain-id "abc-123" \
572
- --asset-id "ece43ce5-ac45-4e50-a4d0-365a64299efc"
571
+ --status Published \
572
+ --update-frequency Monthly \
573
+ --endorsed
574
+
575
+ # Delete a data product (with confirmation)
576
+ pvw uc dataproduct delete --product-id "prod-789"
577
+
578
+ # Delete without confirmation prompt
579
+ pvw uc dataproduct delete --product-id "prod-789" --yes
573
580
  ```
574
581
 
575
582
  #### 🎯 **Objectives & Key Results (OKRs)**
@@ -614,6 +621,85 @@ pvw uc cde link \
614
621
  --asset-id "ea3412c3-7387-4bc1-9923-11f6f6f60000"
615
622
  ```
616
623
 
624
+ #### 🏥 **Health Monitoring (NEW)**
625
+
626
+ Monitor governance health and get automated recommendations to improve your data governance posture.
627
+
628
+ ```bash
629
+ # List all health findings and recommendations
630
+ pvw uc health query
631
+
632
+ # Filter by severity
633
+ pvw uc health query --severity High
634
+ pvw uc health query --severity Medium
635
+
636
+ # Filter by status
637
+ pvw uc health query --status NotStarted
638
+ pvw uc health query --status InProgress
639
+
640
+ # Get detailed information about a specific health action
641
+ pvw uc health show --action-id "5ea3fc78-6a77-4098-8779-ed81de6f87c9"
642
+
643
+ # Update health action status
644
+ pvw uc health update \
645
+ --action-id "5ea3fc78-6a77-4098-8779-ed81de6f87c9" \
646
+ --status InProgress \
647
+ --reason "Working on assigning glossary terms to data products"
648
+
649
+ # Get health summary statistics
650
+ pvw uc health summary
651
+
652
+ # Output health findings in JSON format
653
+ pvw uc health query --json
654
+ ```
655
+
656
+ **Health Finding Types:**
657
+ - Missing glossary terms on data products (High)
658
+ - Data products without OKRs (Medium)
659
+ - Missing data quality scores (Medium)
660
+ - Classification gaps on data assets (Medium)
661
+ - Description quality issues (Medium)
662
+ - Business domains without critical data entities (Medium)
663
+
664
+ #### 🔄 **Workflow Management (NEW)**
665
+
666
+ Manage approval workflows and business process automation in Purview.
667
+
668
+ ```bash
669
+ # List all workflows
670
+ pvw workflow list
671
+
672
+ # Get workflow details
673
+ pvw workflow get --workflow-id "workflow-123"
674
+
675
+ # Create a new workflow (requires JSON definition)
676
+ pvw workflow create --workflow-id "approval-flow-1" --payload-file workflow-definition.json
677
+
678
+ # Execute a workflow
679
+ pvw workflow execute --workflow-id "workflow-123"
680
+
681
+ # List workflow executions
682
+ pvw workflow executions --workflow-id "workflow-123"
683
+
684
+ # View specific execution details
685
+ pvw workflow execution-details --workflow-id "workflow-123" --execution-id "exec-456"
686
+
687
+ # Update workflow configuration
688
+ pvw workflow update --workflow-id "workflow-123" --payload-file updated-workflow.json
689
+
690
+ # Delete a workflow
691
+ pvw workflow delete --workflow-id "workflow-123"
692
+
693
+ # Output workflows in JSON format
694
+ pvw workflow list --json
695
+ ```
696
+
697
+ **Workflow Use Cases:**
698
+ - Data access request approvals
699
+ - Glossary term certification workflows
700
+ - Data product publishing approvals
701
+ - Classification review processes
702
+
617
703
  #### 🔄 **Integrated Workflow Example**
618
704
 
619
705
  ```bash
@@ -765,6 +851,8 @@ PVW CLI provides comprehensive automation for all major Microsoft Purview APIs,
765
851
  ### Supported API Groups
766
852
 
767
853
  - **Unified Catalog**: Complete governance domains, glossary terms, data products, OKRs, CDEs management ✅
854
+ - **Health Monitoring**: Automated governance health checks and recommendations ✅ NEW
855
+ - **Workflows**: Approval workflows and business process automation ✅ NEW
768
856
  - **Data Map**: Full entity and lineage management ✅
769
857
  - **Discovery**: Advanced search, browse, and query capabilities ✅
770
858
  - **Collections**: Collection and account management ✅
@@ -1,12 +1,13 @@
1
- purviewcli/__init__.py,sha256=21ukxxDPxmUrkqK6GkhoW6I4r54OajBPaPO_WTppCrY,413
1
+ purviewcli/__init__.py,sha256=dZabjy1DRPdTFgczuBorfIVXE9tYm-8Z5MQK1meA86I,414
2
2
  purviewcli/__main__.py,sha256=n_PFo1PjW8L1OKCNLsW0vlVSo8tzac_saEYYLTu93iQ,372
3
3
  purviewcli/cli/__init__.py,sha256=UGMctZaXXsV2l2ycnmhTgyksH81_JBQjAPq3oRF2Dqk,56
4
4
  purviewcli/cli/account.py,sha256=YENHkBD0VREajDqtlkTJ-zUvq8aq7LF52HDSOSsgku8,7080
5
5
  purviewcli/cli/cli.py,sha256=ZuthJ24ixbKmqRd-1zv8-jXQtQjn2qQR2plg8TyD0Mg,5801
6
6
  purviewcli/cli/collections.py,sha256=cuSp-XiONXyXWHuUGrDYL462j7WNYRF08mU99gPQlg8,18606
7
7
  purviewcli/cli/domain.py,sha256=zI7YPhcCa4u4MIwnWHQPngTUCKOs6C_rEkdpW-Kl6hM,20897
8
- purviewcli/cli/entity.py,sha256=ZEm-j9BoqFTjkmdm0IftEyn7XGs_W-1LY9pQ0oQgrmQ,87860
8
+ purviewcli/cli/entity.py,sha256=aL45xjPUjs0COEq3j5abplEopE8jY0N13dVOpiTMFnw,89166
9
9
  purviewcli/cli/glossary.py,sha256=Lt4ifyESuuaZLOzssv4GcQEO2AQKYS8Zy8L9UFfdglU,25696
10
+ purviewcli/cli/health.py,sha256=1-0T1pi9Vo6TXgf17vHmyUPah2o-IFnPf8x0aCi3PP4,10547
10
11
  purviewcli/cli/insight.py,sha256=Kevqla6iZ7hPgb-gIWQiXSl2er-N0-Z7Q--IH1icWbs,3853
11
12
  purviewcli/cli/lineage.py,sha256=J7_KSwtdElWc2N5i5l1YBP6QzaWrqP6nnPrjDKzVEkE,21356
12
13
  purviewcli/cli/management.py,sha256=ArSN7ADWMKUJ-fVYjPiuab4g666GQUmxU2WZov3JxzI,7886
@@ -16,14 +17,15 @@ purviewcli/cli/scan.py,sha256=91iKDH8iVNJKndJAisrKx3J4HRoPH2qfmxguLZH3xHY,13807
16
17
  purviewcli/cli/search.py,sha256=B0Ae3-9JCTKICOkJrYS29tMiFTuLJzlx0ISW_23OHF0,13599
17
18
  purviewcli/cli/share.py,sha256=QRZhHM59RxdYqXOjSYLfVRZmjwMg4Y-bWxMSQVTQiIE,20197
18
19
  purviewcli/cli/types.py,sha256=zo_8rAqDQ1vqi5y-dBh_sVY6i16UaJLLx_vBJBfZrrw,23729
19
- purviewcli/cli/unified_catalog.py,sha256=hW33LqjfP_wK9g72RGfCEOdKqurV2dRhGubhTJVu9p0,27087
20
- purviewcli/cli/workflow.py,sha256=DZLzVCZVp5k7gfBrh7YTARBHHEDgffQ8M0CBQh-h548,13260
20
+ purviewcli/cli/unified_catalog.py,sha256=N22rgUA2V36lxX1iWxqY7o5zYz5arYza9jALWn1ce-8,44668
21
+ purviewcli/cli/workflow.py,sha256=wZj5p9fwiPiftKQwGqnn3asAqKuLhYvXRNDcpJQr8WY,14714
21
22
  purviewcli/client/__init__.py,sha256=qjhTkXkgxlNUY3R1HkrT_Znt03-2d8JDolPVOeVv2xI,37
22
23
  purviewcli/client/_account.py,sha256=5lacA7vvjGBLHUDRjFR7B5E8eN6T07rctVDRXR9JFTY,12397
23
24
  purviewcli/client/_collections.py,sha256=17ma6aD6gftIe-Nhwy96TPE42O6qp0hmw84xei4VPpo,12101
24
25
  purviewcli/client/_domain.py,sha256=Yt4RsIoGWz6ND9Ii4CtoGM6leEAL_KNXYcp6AK9KMqs,3744
25
26
  purviewcli/client/_entity.py,sha256=6yU_j0RSGUF-xzzOhLaensm6ulkmrQPWkSar6pycC04,20601
26
27
  purviewcli/client/_glossary.py,sha256=7kB3RXVOCCR1RGlaALmr_BwN6S76-xCoyVqD5ZMzt-k,20985
28
+ purviewcli/client/_health.py,sha256=bKX2PChw2OB2kD_ZEfWlDxc093qQX3ai31YCQQ2VaKg,5921
27
29
  purviewcli/client/_insight.py,sha256=2KX6dVAkyFFMLuQ02Ko2J7WhARKlCLhSgtFkjFJxZ7c,16031
28
30
  purviewcli/client/_lineage.py,sha256=z-yckIduq4Ed9EXTWe-2hqBvl37t5yl87wzVPD_c3y0,14633
29
31
  purviewcli/client/_management.py,sha256=2_ZXRSeEzGuHv1muUbn8mQb07enYYuHPI3NskIHIVbk,19549
@@ -33,13 +35,13 @@ purviewcli/client/_scan.py,sha256=2atEBD-kKWtFuBSWh2P0cwp42gfg7qgwWq-072QZMs4,15
33
35
  purviewcli/client/_search.py,sha256=vUDgjZtnNkHaCqsCXPp1Drq9Kknrkid17RNSXZhi1yw,11890
34
36
  purviewcli/client/_share.py,sha256=vKENIhePuzi3WQazNfv5U9y-6yxRk222zrFA-SGh1pc,10494
35
37
  purviewcli/client/_types.py,sha256=ONa3wh1F02QOVy51UGq54121TkqRcWczdXIvNqPIFU0,15454
36
- purviewcli/client/_unified_catalog.py,sha256=uQ2i3UQLHC6-_XkdvqNaJcOP7q9LQ0kzwPzv18BuGjE,11850
37
- purviewcli/client/_workflow.py,sha256=ohZpEOHxfXoxVqgUWz7HjKebWxYRngBFgfEGu3fS3vY,17886
38
+ purviewcli/client/_unified_catalog.py,sha256=RlpcoCFOiD1dwMKMuY0Gm0qhn9ystyyJDc3Mo1hF-nc,36819
39
+ purviewcli/client/_workflow.py,sha256=po5lomq07s3d7IAzZ5ved5JO6SsBU_JUA4lQSObdJR4,17904
38
40
  purviewcli/client/api_client.py,sha256=ZLpNdItu8H2Rfj0HCud2A67Gml7YCS5ZuhR5lrR0r5g,22637
39
41
  purviewcli/client/business_rules.py,sha256=VR4QqOE1Pg0nFjqAE-zbt-KqIenvzImLU-TBLki9bYc,27560
40
42
  purviewcli/client/config.py,sha256=pQIA168XxeddTSaZJ5qXI7KolIrLqDyBTgbILdDzEs0,7963
41
43
  purviewcli/client/data_quality.py,sha256=lAb-ma5MY2nyY4Dq8Q5wN9wzY0J9FikiQN8jPO2u6VU,14988
42
- purviewcli/client/endpoint.py,sha256=Th8fr81cTrPARyUdG932rLctv40t3k1JEfeKXKbVsDY,3044
44
+ purviewcli/client/endpoint.py,sha256=DWCXOkzQWIfhJKmEZEGRCw3PZgBkB0okr3SGa34tmAY,4009
43
45
  purviewcli/client/endpoints.py,sha256=GcY4ygmBQ2h14uY3uXcyJofmlK0ACCjl7uR33QDaO2w,27066
44
46
  purviewcli/client/exceptions.py,sha256=3UA6wUa-SLxfhGvkdOgJouvOJGulvG1zt6eRN_4imsg,1244
45
47
  purviewcli/client/lineage_visualization.py,sha256=rFKr5cYDauwg4QEHKI7kkqKdHQKgMG6CSUPOmhAz3fI,29644
@@ -48,11 +50,11 @@ purviewcli/client/rate_limiter.py,sha256=wn9iUrL79oq3s7nBo2shsAtiiLgH0Zbb0mzHXXZ
48
50
  purviewcli/client/retry_handler.py,sha256=eMxtDTUYsa4_BgAsnE1MPjitnYqCQddNKwnNTTk1w6Q,3960
49
51
  purviewcli/client/scanning_operations.py,sha256=qPZGuVVbi1cV1Z-K_WKZ-Up3vlk6O8hGArsljfWpZ_Y,22304
50
52
  purviewcli/client/settings.py,sha256=nYdnYurTZsgv9vcgljnzVxLPtYVl9q6IplqOzi1aRvI,27
51
- purviewcli/client/sync_client.py,sha256=Bad9T7jdmKYH8YEI1mtOow6d_2QSfZMRnQij2-ovj-I,9249
53
+ purviewcli/client/sync_client.py,sha256=gwCqesJTNaXn1Q-j57O95R9mn3fIOhdP4sc8jBaBcYw,9493
52
54
  purviewcli/plugins/__init__.py,sha256=rpt3OhFt_wSE_o8Ga8AXvw1pqkdBxLmjrhYtE_-LuJo,29
53
55
  purviewcli/plugins/plugin_system.py,sha256=C-_dL4FUj90o1JS7Saxkpov6fz0GIF5PFhZTYwqBkWE,26774
54
- pvw_cli-1.0.9.dist-info/METADATA,sha256=R8eaIx1HrazAy3zZyg8eYzbBmTpnDk3UXL0eJRTD1TQ,25246
55
- pvw_cli-1.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
56
- pvw_cli-1.0.9.dist-info/entry_points.txt,sha256=VI6AAbc6sWahOCX7sn_lhJIr9OiJM0pHF7rmw1YVGlE,82
57
- pvw_cli-1.0.9.dist-info/top_level.txt,sha256=LrADzPoKwF1xY0pGKpWauyOVruHCIWKCkT7cwIl6IuI,11
58
- pvw_cli-1.0.9.dist-info/RECORD,,
56
+ pvw_cli-1.0.11.dist-info/METADATA,sha256=704lbXcsxaSK_H62_8SHSmhQqKrTtSA5tclHP7KwVlc,28082
57
+ pvw_cli-1.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
58
+ pvw_cli-1.0.11.dist-info/entry_points.txt,sha256=VI6AAbc6sWahOCX7sn_lhJIr9OiJM0pHF7rmw1YVGlE,82
59
+ pvw_cli-1.0.11.dist-info/top_level.txt,sha256=LrADzPoKwF1xY0pGKpWauyOVruHCIWKCkT7cwIl6IuI,11
60
+ pvw_cli-1.0.11.dist-info/RECORD,,