-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Yifanzhou/purview datamap 0901 #34369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
catalinaperalta
merged 35 commits into
Azure:main
from
yifan-zhou922:yifanzhou/purview-datamap-0901
Mar 5, 2024
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
b60b6b3
update SDKs
yifan-zhou922 11a999a
update
yifan-zhou922 e1c37f2
update test
yifan-zhou922 2f80702
Update CHANGELOG.md
yifan-zhou922 f2e6b89
Update conftest.py
yifan-zhou922 be08f82
update
yifan-zhou922 cdcf0ab
Merge branch 'main' into yifanzhou/purview-datamap-0901
yifan-zhou922 2bd49a8
regenerate
yifan-zhou922 7c3c125
update test
yifan-zhou922 77a7938
update tests
yifan-zhou922 f862b44
update
yifan-zhou922 ffa3697
Update conftest.py
yifan-zhou922 cfeea05
update
yifan-zhou922 0cb2580
Update cspell.json
yifan-zhou922 4d12fb7
Update cspell.json
yifan-zhou922 546741d
Create assets.json
yifan-zhou922 0e24b40
Update environment_exclusions.py
yifan-zhou922 89a1c13
Update assets.json
ChenxiJiang333 43bc5c6
Update README.md
yifan-zhou922 200feb3
Delete sdk/purview/azure-purview-datamap/tests/recordings directory
ChenxiJiang333 5f7bb1f
update samples
yifan-zhou922 75846c1
Update assets.json
ChenxiJiang333 24582c0
Update README.md
yifan-zhou922 84c777f
Update CHANGELOG.md
msyyc a828fa2
Update README.md
yifan-zhou922 ee0a8c5
Update get_types.py
yifan-zhou922 fcef269
update
yifan-zhou922 ebf5bf9
update
yifan-zhou922 02a8f8a
Merge branch 'main' into yifanzhou/purview-datamap-0901
yifan-zhou922 04ea95c
Update README.md
yifan-zhou922 770ff4e
Create pyproject.toml
yifan-zhou922 43b32a9
Update CHANGELOG.md
yifan-zhou922 95a2a97
Update sdk/purview/azure-purview-datamap/README.md
yifan-zhou922 0373efe
Update sdk/purview/azure-purview-datamap/README.md
yifan-zhou922 9867dda
Update get_types.py
yifan-zhou922 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Release History | ||
|
|
||
| ## 1.0.0b1 (2024-03-05) | ||
|
|
||
| - Initial version for Purview DataMap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| Copyright (c) Microsoft Corporation. | ||
|
|
||
| MIT License | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| include *.md | ||
| include LICENSE | ||
| include azure/purview/datamap/py.typed | ||
| recursive-include tests *.py | ||
| recursive-include samples *.py *.md | ||
| include azure/__init__.py | ||
| include azure/purview/__init__.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Azure Purview Datamap client library for Python | ||
| 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). | ||
|
|
||
| ## Getting started | ||
|
|
||
| ### Installing the package | ||
|
|
||
| ```bash | ||
| python -m pip install azure-purview-datamap | ||
| ``` | ||
|
|
||
| #### Prequisites | ||
|
|
||
| - Python 3.8 or later is required to use this package. | ||
| - You need an [Azure subscription][azure_sub] to use this package. | ||
| - An existing Azure Purview Datamap instance. | ||
| #### Create with an Azure Active Directory Credential | ||
| To use an [Azure Active Directory (AAD) token credential][authenticate_with_token], | ||
| provide an instance of the desired credential type obtained from the | ||
| [azure-identity][azure_identity_credentials] library. | ||
|
|
||
| To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip] | ||
|
|
||
| After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use. | ||
| As an example, [DefaultAzureCredential][default_azure_credential] can be used to authenticate the client: | ||
|
|
||
| Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: | ||
| `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET` | ||
|
|
||
| Use the returned token credential to authenticate the client: | ||
|
|
||
| ```python | ||
| >>> from azure.purview.datamap import DataMapClient | ||
| >>> from azure.identity import DefaultAzureCredential | ||
| >>> client = DataMapClient(endpoint='<endpoint>', credential=DefaultAzureCredential()) | ||
| ``` | ||
|
|
||
| ## Key concepts | ||
|
|
||
| ### Client | ||
|
|
||
| This package offers request builders so you can build http requests and send these requests to the service using the `send_request` method. | ||
| For more information on how to use request builders and our clients, see [here][request_builders_and_client]. | ||
|
|
||
| ## Examples | ||
|
|
||
| ```python | ||
| >>> from azure.purview.datamap import DataMapClient | ||
| >>> from azure.identity import DefaultAzureCredential | ||
| >>> from azure.core.exceptions import HttpResponseError | ||
|
|
||
| >>> client = DataMapClient(endpoint='<endpoint>', credential=DefaultAzureCredential()) | ||
| >>> try: | ||
| client.type_definition.get() | ||
| except HttpResponseError as e: | ||
| print('service responds error: {}'.format(e.response.json())) | ||
|
|
||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ## Next steps | ||
|
|
||
| For more generic samples, see our [client docs][request_builders_and_client]. | ||
yifan-zhou922 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Contributing | ||
|
|
||
| This project welcomes contributions and suggestions. Most contributions require | ||
| you to agree to a Contributor License Agreement (CLA) declaring that you have | ||
| the right to, and actually do, grant us the rights to use your contribution. | ||
| For details, visit https://cla.microsoft.com. | ||
|
|
||
| When you submit a pull request, a CLA-bot will automatically determine whether | ||
| you need to provide a CLA and decorate the PR appropriately (e.g., label, | ||
| comment). Simply follow the instructions provided by the bot. You will only | ||
| need to do this once across all repos using our CLA. | ||
|
|
||
| This project has adopted the | ||
| [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, | ||
| see the Code of Conduct FAQ or contact [email protected] with any | ||
| additional questions or comments. | ||
|
|
||
| <!-- LINKS --> | ||
| [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ | ||
| [authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token | ||
| [azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials | ||
| [azure_identity_pip]: https://pypi.org/project/azure-identity/ | ||
| [default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential | ||
| [request_builders_and_client]: https://aka.ms/azsdk/python/protocol/quickstart | ||
| [pip]: https://pypi.org/project/pip/ | ||
| [azure_sub]: https://azure.microsoft.com/free/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "AssetsRepo": "Azure/azure-sdk-assets", | ||
| "AssetsRepoPrefixPath": "python", | ||
| "TagPrefix": "python/purview/azure-purview-datamap", | ||
| "Tag": "python/purview/azure-purview-datamap_3f980f3fd6" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore | ||
msyyc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
26 changes: 26 additions & 0 deletions
26
sdk/purview/azure-purview-datamap/azure/purview/datamap/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) Python Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._client import DataMapClient | ||
| from ._version import VERSION | ||
|
|
||
| __version__ = VERSION | ||
|
|
||
| try: | ||
| from ._patch import __all__ as _patch_all | ||
| from ._patch import * # pylint: disable=unused-wildcard-import | ||
| except ImportError: | ||
| _patch_all = [] | ||
| from ._patch import patch_sdk as _patch_sdk | ||
|
|
||
| __all__ = [ | ||
| "DataMapClient", | ||
| ] | ||
| __all__.extend([p for p in _patch_all if p not in __all__]) | ||
|
|
||
| _patch_sdk() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.