pvw-cli 1.0.6__py3-none-any.whl → 1.0.9__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.

@@ -1,399 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pvw-cli
3
- Version: 1.0.6
4
- Summary: Microsoft Purview CLI with comprehensive automation capabilities
5
- Home-page: https://github.com/Keayoub/Purview_cli
6
- Author: Ayoub KEBAILI
7
- Author-email: AYOUB KEBAILI <keayoub@msn.com>
8
- Maintainer-email: AYOUB KEBAILI <keayoub@msn.com>
9
- License: MIT
10
- Project-URL: Homepage, https://github.com/your-org/pvw-cli
11
- Project-URL: Documentation, https://pvw-cli.readthedocs.io/
12
- Project-URL: Repository, https://github.com/your-org/pvw-cli.git
13
- Project-URL: Bug Tracker, https://github.com/your-org/pvw-cli/issues
14
- Project-URL: Changelog, https://github.com/your-org/pvw-cli/blob/main/CHANGELOG.md
15
- Keywords: azure,purview,cli,data,catalog,governance,automation,pvw
16
- Classifier: Development Status :: 4 - Beta
17
- Classifier: Intended Audience :: Developers
18
- Classifier: Intended Audience :: System Administrators
19
- Classifier: Operating System :: OS Independent
20
- Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3.8
22
- Classifier: Programming Language :: Python :: 3.9
23
- Classifier: Programming Language :: Python :: 3.10
24
- Classifier: Programming Language :: Python :: 3.11
25
- Classifier: Programming Language :: Python :: 3.12
26
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
- Classifier: Topic :: System :: Systems Administration
28
- Classifier: Topic :: Database
29
- Classifier: Topic :: Internet :: WWW/HTTP
30
- Requires-Python: >=3.8
31
- Description-Content-Type: text/markdown
32
- Requires-Dist: click>=8.0.0
33
- Requires-Dist: rich>=12.0.0
34
- Requires-Dist: azure-identity>=1.12.0
35
- Requires-Dist: azure-core>=1.24.0
36
- Requires-Dist: requests>=2.28.0
37
- Requires-Dist: pandas>=1.5.0
38
- Requires-Dist: aiohttp>=3.8.0
39
- Requires-Dist: pydantic>=1.10.0
40
- Requires-Dist: typer>=0.7.0
41
- Requires-Dist: PyYAML>=6.0
42
- Requires-Dist: python-dotenv>=0.19.0
43
- Requires-Dist: asyncio-throttle>=1.0.0
44
- Requires-Dist: tabulate>=0.9.0
45
- Provides-Extra: dev
46
- Requires-Dist: pytest>=7.0.0; extra == "dev"
47
- Requires-Dist: pytest-asyncio>=0.20.0; extra == "dev"
48
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
49
- Requires-Dist: black>=22.0.0; extra == "dev"
50
- Requires-Dist: isort>=5.10.0; extra == "dev"
51
- Requires-Dist: flake8>=5.0.0; extra == "dev"
52
- Requires-Dist: mypy>=0.991; extra == "dev"
53
- Requires-Dist: pre-commit>=2.20.0; extra == "dev"
54
- Provides-Extra: docs
55
- Requires-Dist: sphinx>=5.0.0; extra == "docs"
56
- Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
57
- Requires-Dist: myst-parser>=0.18.0; extra == "docs"
58
- Provides-Extra: test
59
- Requires-Dist: pytest>=7.0.0; extra == "test"
60
- Requires-Dist: pytest-asyncio>=0.20.0; extra == "test"
61
- Requires-Dist: pytest-cov>=4.0.0; extra == "test"
62
- Requires-Dist: requests-mock>=1.9.0; extra == "test"
63
-
64
- # PURVIEW CLI v1.0.0 - Microsoft Purview Automation & Data Governance
65
-
66
- > **LATEST UPDATE (June 2025):**
67
- > - Major: Advanced Data Product Management (see new `data-product` command group)
68
- > - Enhanced Discovery Query/Search support (see below for usage).
69
-
70
- ---
71
-
72
- ## What is PVW CLI?
73
-
74
- **PVW CLI v1.0.0** 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:
75
-
76
- - Entity management (create, update, bulk, import/export)
77
- - Glossary and term management
78
- - Lineage operations
79
- - Collection and account management
80
- - Advanced search and discovery
81
- - Data product management (new, see below)
82
- - Classification, label, and status management
83
- - And more (see command reference)
84
-
85
- The CLI is designed for data engineers, stewards, architects, and platform teams to automate, scale, and enhance their Microsoft Purview experience.
86
-
87
- ---
88
-
89
- ## Quick Start (pip install)
90
-
91
- Get started with PVW CLI in minutes:
92
-
93
- 1. **Install the CLI**
94
-
95
- ```bash
96
- pip install pvw-cli
97
- ```
98
-
99
- 2. **Set Environment Variables**
100
-
101
- ```bash
102
- set PURVIEW_ACCOUNT_NAME=your-purview-account
103
- set AZURE_REGION= # (optional, e.g. 'china', 'usgov')
104
- ```
105
-
106
- 3. **Authenticate**
107
-
108
- - Run `az login` (recommended)
109
- - Or set Service Principal credentials as environment variables
110
-
111
- 4. **Run Your First Search**
112
-
113
- ```bash
114
- pvw search query --keywords="customer" --limit=5
115
- ```
116
-
117
- 5. **See All Commands**
118
-
119
- ```bash
120
- pvw --help
121
- ```
122
-
123
- For more advanced usage, see the sections below or visit the [documentation](https://pvw-cli.readthedocs.io/).
124
-
125
- ---
126
-
127
- ## Overview
128
-
129
- **PVW CLI v1.0.0** is a modern command-line interface and Python library for Microsoft Purview, enabling:
130
-
131
- - Advanced data catalog search and discovery
132
- - Bulk import/export of entities, glossary terms, and lineage
133
- - Real-time monitoring and analytics
134
- - Automated governance and compliance
135
- - Extensible plugin system
136
-
137
- ---
138
-
139
- ## Installation
140
-
141
- You can install PVW CLI in two ways:
142
-
143
- 1. **From PyPI (recommended for most users):**
144
-
145
- ```bash
146
- pip install pvw-cli
147
- ```
148
-
149
- 2. **Directly from the GitHub repository (for latest/dev version):**
150
-
151
- ```bash
152
- pip install git+https://github.com/Keayoub/Purview_cli.git
153
- ```
154
-
155
- Or for development (editable install):
156
-
157
- ```bash
158
- git clone https://github.com/Keayoub/Purview_cli.git
159
- cd Purview_cli
160
- pip install -r requirements.txt
161
- pip install -e .
162
- ```
163
-
164
- ---
165
-
166
- ## Requirements
167
-
168
- - Python 3.8+
169
- - Azure CLI (`az login`) or Service Principal credentials
170
- - Microsoft Purview account
171
-
172
- ---
173
-
174
- ## Getting Started
175
-
176
- 1. **Install**
177
-
178
- ```bash
179
- pip install pvw-cli
180
- ```
181
-
182
- 2. **Set Environment Variables**
183
-
184
- ```bash
185
- set PURVIEW_ACCOUNT_NAME=your-purview-account
186
- set AZURE_REGION= # (optional, e.g. 'china', 'usgov')
187
- ```
188
-
189
- 3. **Authenticate**
190
-
191
- - Azure CLI: `az login`
192
-
193
- - Or set Service Principal credentials as environment variables
194
-
195
- 4. **Run a Command**
196
-
197
- ```bash
198
- pvw search query --keywords="customer" --limit=5
199
- ```
200
-
201
- 5. **See All Commands**
202
-
203
- ```bash
204
- pvw --help
205
- ```
206
-
207
- ---
208
-
209
- ## Authentication
210
-
211
- PVW CLI supports multiple authentication methods for connecting to Microsoft Purview, powered by Azure Identity's `DefaultAzureCredential`. This allows you to use the CLI securely in local development, CI/CD, and production environments.
212
-
213
- ### 1. Azure CLI Authentication (Recommended for Interactive Use)
214
-
215
- - Run `az login` to authenticate interactively with your Azure account.
216
- - The CLI will automatically use your Azure CLI credentials.
217
-
218
- ### 2. Service Principal Authentication (Recommended for Automation/CI/CD)
219
-
220
- Set the following environment variables before running any PVW CLI command:
221
-
222
- - `AZURE_CLIENT_ID` (your Azure AD app registration/client ID)
223
- - `AZURE_TENANT_ID` (your Azure AD tenant ID)
224
- - `AZURE_CLIENT_SECRET` (your client secret)
225
-
226
- **Example (Windows):**
227
-
228
- ```cmd
229
- set AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
230
- set AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
231
- set AZURE_CLIENT_SECRET=your-client-secret
232
- ```
233
-
234
- **Example (Linux/macOS):**
235
-
236
- ```bash
237
- export AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
238
- export AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
239
- export AZURE_CLIENT_SECRET=your-client-secret
240
- ```
241
-
242
- ### 3. Managed Identity (for Azure VMs, App Services, etc.)
243
-
244
- If running in Azure with a managed identity, no extra configuration is needed. The CLI will use the managed identity automatically.
245
-
246
- ### 4. Visual Studio/VS Code Authentication
247
-
248
- If you are signed in to Azure in Visual Studio or VS Code, `DefaultAzureCredential` can use those credentials as a fallback.
249
-
250
- ---
251
-
252
- **Note:**
253
- - The CLI will try all supported authentication methods in order. The first one that works will be used.
254
- - For most automation and CI/CD scenarios, service principal authentication is recommended.
255
- - For local development, Azure CLI authentication is easiest.
256
-
257
- For more details, see the [Azure Identity documentation](https://learn.microsoft.com/en-us/python/api/overview/azure/identity-readme?view=azure-python).
258
-
259
- ---
260
-
261
- ## Search Command (Discovery Query API)
262
-
263
- The PVW CLI provides advanced search using the latest Microsoft Purview Discovery Query API:
264
-
265
- - Search for assets, tables, files, and more with flexible filters
266
- - Use autocomplete and suggestion endpoints
267
- - Perform faceted, time-based, and entity-type-specific queries
268
-
269
- ### CLI Usage Examples
270
-
271
- ```bash
272
- # Basic search for assets with keyword 'customer'
273
- pvw search query --keywords="customer" --limit=5
274
-
275
- # Advanced search with classification filter
276
- pvw search query --keywords="sales" --classification="PII" --objectType="Tables" --limit=10
277
-
278
- # Autocomplete suggestions for partial keyword
279
- pvw search autocomplete --keywords="ord" --limit=3
280
-
281
- # Get search suggestions (fuzzy matching)
282
- pvw search suggest --keywords="prod" --limit=2
283
-
284
- # Faceted search with aggregation
285
- pvw search query --keywords="finance" --facetFields="objectType,classification" --limit=5
286
-
287
- # Browse entities by type and path
288
- pvw search browse --entityType="Tables" --path="/root/finance" --limit=2
289
-
290
- # Time-based search for assets created after a date
291
- pvw search query --keywords="audit" --createdAfter="2024-01-01" --limit=1
292
-
293
- # Entity type specific search
294
- pvw search query --entityTypes="Files,Tables" --limit=2
295
- ```
296
-
297
- ### Python Usage Example
298
-
299
- ```python
300
- from purviewcli.client._search import Search
301
-
302
- search = Search()
303
- args = {"--keywords": "customer", "--limit": 5}
304
- search.searchQuery(args)
305
- print(search.payload) # Shows the constructed search payload
306
- ```
307
-
308
- ### Test Examples
309
-
310
- See `tests/test_search_examples.py` for ready-to-run pytest examples covering all search scenarios:
311
-
312
- - Basic query
313
- - Advanced filter
314
- - Autocomplete
315
- - Suggest
316
- - Faceted search
317
- - Browse
318
- - Time-based search
319
- - Entity type search
320
-
321
- ---
322
-
323
- ## Data Product Management (Advanced)
324
-
325
- PVW CLI now includes a powerful `data-product` command group for advanced data product lifecycle management. This is in addition to the CLI's support for all core Purview APIs.
326
-
327
- See [`doc/commands/data-product.md`](doc/commands/data-product.md) for full documentation and examples.
328
-
329
- ### Example Commands
330
-
331
- ```bash
332
- # Create a data product
333
- pvw data-product create --qualified-name="product.test.1" --name="Test Product" --description="A test data product"
334
-
335
- # Add classification and label
336
- pvw data-product add-classification --qualified-name="product.test.1" --classification="PII"
337
- pvw data-product add-label --qualified-name="product.test.1" --label="gold"
338
-
339
- # Link glossary term
340
- data-product link-glossary --qualified-name="product.test.1" --term="Customer"
341
-
342
- # Set status and show lineage
343
- data-product set-status --qualified-name="product.test.1" --status="active"
344
- data-product show-lineage --qualified-name="product.test.1"
345
- ```
346
-
347
- ---
348
-
349
- ## Core Features
350
-
351
- - **Discovery Query/Search**: Flexible, advanced search for all catalog assets
352
- - **Entity Management**: Bulk import/export, update, and validation
353
- - **Glossary Management**: Import/export terms, assign terms in bulk
354
- ```bash
355
- # List all terms in a glossary
356
- pvw glossary list-terms --glossary-guid "your-glossary-guid"
357
-
358
- # Create and manage glossary terms
359
- pvw glossary create-term --payload-file term.json
360
- ```
361
- - **Lineage Operations**: Lineage discovery, CSV-based bulk lineage
362
- - **Monitoring & Analytics**: Real-time dashboards, metrics, and reporting
363
- - **Plugin System**: Extensible with custom plugins
364
-
365
- ---
366
-
367
- ## API Coverage and Upcoming Features
368
-
369
- PVW CLI aims to provide comprehensive automation for all major Microsoft Purview APIs. However, some features—such as governance domain CRUD operations—are not yet available via the public REST API as of June 2025.
370
-
371
- - For the latest API documentation and updates, see:
372
- - [Microsoft Purview REST API reference](https://learn.microsoft.com/en-us/rest/api/purview/)
373
- - [Atlas 2.2 API documentation](https://learn.microsoft.com/en-us/purview/data-gov-api-atlas-2-2)
374
-
375
- ### API Version Support
376
-
377
- - Data Map: **2024-03-01-preview** (default) or **2023-09-01** (stable)
378
- - Collections: **2019-11-01-preview**
379
- - Account: **2019-11-01-preview**
380
- - Management: **2021-07-01**
381
- - Scan: **2018-12-01-preview**
382
-
383
- **Note:**
384
- - Domain management (create, update, delete) is not currently supported by the public API. The CLI will add support for these features as soon as Microsoft releases the necessary endpoints.
385
- - Please monitor the above links and [Azure Updates](https://azure.microsoft.com/updates/) for new API releases.
386
-
387
- If you need a feature that is not yet implemented due to API limitations, please open an issue or check for updates in future releases.
388
-
389
- ---
390
-
391
- ## Contributing & Support
392
-
393
- - [Documentation](https://github.com/Keayoub/Purview_cli/blob/main/doc/README.md)
394
- - [Issue Tracker](https://github.com/Keayoub/Purview_cli/issues)
395
- - [Email Support](mailto:keayoub@msn.com)
396
-
397
- ---
398
-
399
- **PVW CLI empowers data engineers, stewards, and architects to automate, scale, and enhance their Microsoft Purview experience with powerful command-line and programmatic capabilities.**