forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 26702 in Azure/azure-rest-api-specs
Merge 2d1cd1b7ba8a4fd7d009c469936ce5fad054e45c into 58561151bac45fcd686dec2bae22b95bba5e5186
- Loading branch information
SDKAuto
committed
Nov 28, 2023
1 parent
a7b431a
commit caf3e1a
Showing
37 changed files
with
31,648 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 (1970-01-01) | ||
|
||
- Initial version |
This file contains 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 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,8 @@ | ||
include *.md | ||
include LICENSE | ||
include azure/analytics/purview/datamap/py.typed | ||
recursive-include tests *.py | ||
recursive-include samples *.py *.md | ||
include azure/__init__.py | ||
include azure/analytics/__init__.py | ||
include azure/analytics/purview/__init__.py |
This file contains 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,80 @@ | ||
|
||
|
||
# Azure Analytics Purview Datamap client library for Python | ||
<!-- write necessary description of service --> | ||
|
||
## Getting started | ||
|
||
### Installating the package | ||
|
||
```bash | ||
python -m pip install azure-analytics-purview-datamap | ||
``` | ||
|
||
#### Prequisites | ||
|
||
- Python 3.7 or later is required to use this package. | ||
- You need an [Azure subscription][azure_sub] to use this package. | ||
- An existing Azure Analytics 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.analytics.purview.datamap import EntityClient | ||
>>> from azure.identity import DefaultAzureCredential | ||
>>> client = EntityClient(endpoint='<endpoint>', credential=DefaultAzureCredential()) | ||
``` | ||
|
||
## Examples | ||
|
||
```python | ||
>>> from azure.analytics.purview.datamap import EntityClient | ||
>>> from azure.identity import DefaultAzureCredential | ||
>>> from azure.core.exceptions import HttpResponseError | ||
|
||
>>> client = EntityClient(endpoint='<endpoint>', credential=DefaultAzureCredential()) | ||
>>> try: | ||
<!-- write test code here --> | ||
except HttpResponseError as e: | ||
print('service responds error: {}'.format(e.response.json())) | ||
|
||
``` | ||
|
||
## 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 | ||
[pip]: https://pypi.org/project/pip/ | ||
[azure_sub]: https://azure.microsoft.com/free/ | ||
|
This file contains 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 @@ | ||
{ | ||
"commit": "e2d12f2c2352e634cbb405b7ceca438ead8b53fd", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs", | ||
"typespec_src": "specification/purview/Azure.Analytics.Purview.DataMap", | ||
"@azure-tools/typespec-python": "0.15.14" | ||
} |
This file contains 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 |
1 change: 1 addition & 0 deletions
1
sdk/purview/azure-analytics-purview-datamap/azure/analytics/__init__.py
This file contains 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 |
1 change: 1 addition & 0 deletions
1
sdk/purview/azure-analytics-purview-datamap/azure/analytics/purview/__init__.py
This file contains 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 |
36 changes: 36 additions & 0 deletions
36
sdk/purview/azure-analytics-purview-datamap/azure/analytics/purview/datamap/__init__.py
This file contains 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,36 @@ | ||
# 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 EntityClient | ||
from ._client import GlossaryClient | ||
from ._client import DiscoveryClient | ||
from ._client import LineageClient | ||
from ._client import RelationshipClient | ||
from ._client import TypeClient | ||
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__ = [ | ||
"EntityClient", | ||
"GlossaryClient", | ||
"DiscoveryClient", | ||
"LineageClient", | ||
"RelationshipClient", | ||
"TypeClient", | ||
] | ||
__all__.extend([p for p in _patch_all if p not in __all__]) | ||
|
||
_patch_sdk() |
Oops, something went wrong.