Skip to content

Commit 293d480

Browse files
yifan-zhou922ChenxiJiang333msyyccatalinaperalta
authored
Yifanzhou/purview datamap 0901 (#34369)
* update SDKs * update * update test * Update CHANGELOG.md * Update conftest.py * update * regenerate * update test * update tests * update * Update conftest.py * update * Update cspell.json * Update cspell.json * Create assets.json * Update environment_exclusions.py * Update assets.json * Update README.md * Delete sdk/purview/azure-purview-datamap/tests/recordings directory * update samples * Update assets.json * Update README.md * Update CHANGELOG.md * Update README.md * Update get_types.py * update * update * Update README.md * Create pyproject.toml * Update CHANGELOG.md * Update sdk/purview/azure-purview-datamap/README.md Co-authored-by: catalinaperalta <[email protected]> * Update sdk/purview/azure-purview-datamap/README.md Co-authored-by: catalinaperalta <[email protected]> * Update get_types.py --------- Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: Yuchao Yan <[email protected]> Co-authored-by: catalinaperalta <[email protected]>
1 parent 47f2d64 commit 293d480

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+101489
-15
lines changed

.vscode/cspell.json

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -682,37 +682,37 @@
682682
},
683683
{
684684
"filename": "sdk/core/azure-core-tracing-opentelemetry/**",
685-
"words": ["ctxt", "somethingstuid"]
685+
"words": [ "ctxt", "somethingstuid" ]
686686
},
687687
{
688688
"filename": "sdk/cognitivelanguage/azure-ai-language-conversations/**",
689-
"words": ["conv", "summ"],
689+
"words": [ "conv", "summ" ],
690690
"caseSensitive": false
691691
},
692692
{
693693
"filename": "sdk/cognitivelanguage/azure-ai-language-conversations/doc/*.rst",
694-
"words": ["undoc"]
694+
"words": [ "undoc" ]
695695
},
696696
{
697697
"filename": "sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/**/_serialization.py",
698-
"words": ["ctxt", "wday", "mday", "astimezone", "unflattened", "JSONify", "deseralize"]
698+
"words": [ "ctxt", "wday", "mday", "astimezone", "unflattened", "JSONify", "deseralize" ]
699699
},
700700
{
701701
"filename": "sdk/cognitivelanguage/azure-ai-language-questionanswering/**",
702-
"words": ["qnas", "qnamaker", "ADTO"],
702+
"words": [ "qnas", "qnamaker", "ADTO" ],
703703
"caseSensitive": false
704704
},
705705
{
706706
"filename": "sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text*.py",
707-
"words": ["groovin", "Olufsen"]
707+
"words": [ "groovin", "Olufsen" ]
708708
},
709709
{
710710
"filename": "sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/**/_serialization.py",
711-
"words": ["ctxt", "wday", "mday", "astimezone", "unflattened", "JSONify", "deseralize"]
711+
"words": [ "ctxt", "wday", "mday", "astimezone", "unflattened", "JSONify", "deseralize" ]
712712
},
713713
{
714714
"filename": "sdk/cognitiveservices/azure-cognitiveservices-language-spellcheck/tests/*.py",
715-
"words": ["Apim", "cognituve"]
715+
"words": [ "Apim", "cognituve" ]
716716
},
717717
{
718718
"filename": "sdk/communication/**",
@@ -1110,7 +1110,7 @@
11101110
},
11111111
{
11121112
"filename": "sdk/loadtestservice/azure-developer-loadtesting/azure/developer/loadtesting/**",
1113-
"words":[
1113+
"words": [
11141114
"vusers"
11151115
]
11161116
},
@@ -1288,7 +1288,7 @@
12881288
},
12891289
{
12901290
"filename": "sdk/attestation/azure-security-attestation/tests/conftest.py",
1291-
"words":[
1291+
"words": [
12921292
"sharedwus"
12931293
]
12941294
},
@@ -1316,8 +1316,8 @@
13161316
"resouce",
13171317
"nnumeral"
13181318
]
1319-
},
1320-
{
1319+
},
1320+
{
13211321
"filename": "sdk/storage/azure-storage-file-share/**",
13221322
"words": [
13231323
"XSMB",
@@ -1511,7 +1511,7 @@
15111511
"jsonify",
15121512
"ints",
15131513
"inirudebwoy",
1514-
"mghextreme"
1514+
"mghextreme"
15151515
]
15161516
},
15171517
{
@@ -1662,8 +1662,8 @@
16621662
"Nify",
16631663
"ctxt",
16641664
"unflattened",
1665-
"deseralize",
1666-
"wday"
1665+
"deseralize",
1666+
"wday"
16671667
]
16681668
},
16691669
{
@@ -1722,6 +1722,16 @@
17221722
"wday"
17231723
]
17241724
},
1725+
{
1726+
"filename": "sdk/purview/azure-purview-datamap/azure/purview/datamap/*.py",
1727+
"words": [
1728+
"mros",
1729+
"Nify",
1730+
"deserializers",
1731+
"ctxt",
1732+
"wday"
1733+
]
1734+
},
17251735
{
17261736
"filename": "sdk/healthinsights/azure-healthinsights-radiologyinsights/**",
17271737
"words": [
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0b1 (2024-03-05)
4+
5+
- Initial version for Purview DataMap
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include *.md
2+
include LICENSE
3+
include azure/purview/datamap/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/purview/__init__.py
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Azure Purview Datamap client library for Python
2+
Microsoft Purview Data Map provides the foundation for data discovery and data governance. Microsoft Purview Data Map is a cloud native PaaS service that captures metadata about enterprise data present in analytics and operation systems on-premises and cloud. DataMapClient provides a set of APIs in the Purview Data Map service. For a full list of APIs, please refer to [Data Map API](https://learn.microsoft.com/rest/api/purview/datamapdataplane/operation-groups?view=rest-purview-datamapdataplane-2023-09-01).
3+
4+
## Getting started
5+
6+
### Installing the package
7+
8+
```bash
9+
python -m pip install azure-purview-datamap
10+
```
11+
12+
#### Prequisites
13+
14+
- Python 3.8 or later is required to use this package.
15+
- You need an [Azure subscription][azure_sub] to use this package.
16+
- An existing Azure Purview Datamap instance.
17+
#### Create with an Azure Active Directory Credential
18+
To use an [Azure Active Directory (AAD) token credential][authenticate_with_token],
19+
provide an instance of the desired credential type obtained from the
20+
[azure-identity][azure_identity_credentials] library.
21+
22+
To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip]
23+
24+
After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use.
25+
As an example, [DefaultAzureCredential][default_azure_credential] can be used to authenticate the client:
26+
27+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
28+
`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`
29+
30+
Use the returned token credential to authenticate the client:
31+
32+
```python
33+
>>> from azure.purview.datamap import DataMapClient
34+
>>> from azure.identity import DefaultAzureCredential
35+
>>> client = DataMapClient(endpoint='<endpoint>', credential=DefaultAzureCredential())
36+
```
37+
38+
## Key concepts
39+
40+
### Client
41+
42+
This package offers request builders so you can build http requests and send these requests to the service using the `send_request` method.
43+
For more information on how to use request builders and our clients, see [here][request_builders_and_client].
44+
45+
## Examples
46+
47+
```python
48+
>>> from azure.purview.datamap import DataMapClient
49+
>>> from azure.identity import DefaultAzureCredential
50+
>>> from azure.core.exceptions import HttpResponseError
51+
52+
>>> client = DataMapClient(endpoint='<endpoint>', credential=DefaultAzureCredential())
53+
>>> try:
54+
client.type_definition.get()
55+
except HttpResponseError as e:
56+
print('service responds error: {}'.format(e.response.json()))
57+
58+
```
59+
60+
## Troubleshooting
61+
62+
## Next steps
63+
64+
For more generic samples, see our [client docs][request_builders_and_client].
65+
66+
## Contributing
67+
68+
This project welcomes contributions and suggestions. Most contributions require
69+
you to agree to a Contributor License Agreement (CLA) declaring that you have
70+
the right to, and actually do, grant us the rights to use your contribution.
71+
For details, visit https://cla.microsoft.com.
72+
73+
When you submit a pull request, a CLA-bot will automatically determine whether
74+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
75+
comment). Simply follow the instructions provided by the bot. You will only
76+
need to do this once across all repos using our CLA.
77+
78+
This project has adopted the
79+
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
80+
see the Code of Conduct FAQ or contact [email protected] with any
81+
additional questions or comments.
82+
83+
<!-- LINKS -->
84+
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
85+
[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token
86+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials
87+
[azure_identity_pip]: https://pypi.org/project/azure-identity/
88+
[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential
89+
[request_builders_and_client]: https://aka.ms/azsdk/python/protocol/quickstart
90+
[pip]: https://pypi.org/project/pip/
91+
[azure_sub]: https://azure.microsoft.com/free/
92+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "python",
4+
"TagPrefix": "python/purview/azure-purview-datamap",
5+
"Tag": "python/purview/azure-purview-datamap_3f980f3fd6"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._client import DataMapClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
21+
__all__ = [
22+
"DataMapClient",
23+
]
24+
__all__.extend([p for p in _patch_all if p not in __all__])
25+
26+
_patch_sdk()

0 commit comments

Comments
 (0)