|
1 | 1 | ---
|
2 | 2 | title:
|
3 | 3 | keywords: Azure, python, SDK, API, azure-mgmt-databricks, databricks
|
4 |
| -author: ramya-rao-a |
5 |
| -ms.author: ramyar |
6 |
| -ms.date: 03/23/2021 |
| 4 | +author: lmazuel |
| 5 | +ms.author: lmazuel |
| 6 | +ms.date: 06/29/2023 |
7 | 7 | ms.topic: reference
|
8 |
| -ms.technology: azure |
9 | 8 | ms.devlang: python
|
10 |
| -ms.service: azure-databricks |
| 9 | +ms.service: databricks |
11 | 10 | ---
|
| 11 | +# Microsoft Azure SDK for Python |
12 | 12 |
|
13 |
| -## Microsoft Azure SDK for Python |
| 13 | +This is the Microsoft Azure Data Bricks Management Client Library. |
| 14 | +This package has been tested with Python 3.7+. |
| 15 | +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). |
14 | 16 |
|
15 |
| -This is the Microsoft Azure Databricks Management Client Library. |
| 17 | +## _Disclaimer_ |
16 | 18 |
|
17 |
| -Azure Resource Manager (ARM) is the next generation of management APIs |
18 |
| -that replace the old Azure Service Management (ASM). |
| 19 | +_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ |
19 | 20 |
|
20 |
| -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. |
| 21 | +## Getting started |
21 | 22 |
|
22 |
| -For the older Azure Service Management (ASM) libraries, see |
23 |
| -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) |
24 |
| -library. |
| 23 | +### Prerequisites |
25 | 24 |
|
26 |
| -For a more complete set of Azure libraries, see the |
27 |
| -[azure sdk python release](https://aka.ms/azsdk/python/all). |
| 25 | +- Python 3.7+ is required to use this package. |
| 26 | +- [Azure subscription](https://azure.microsoft.com/free/) |
28 | 27 |
|
29 |
| -## Usage |
| 28 | +### Install the package |
30 | 29 |
|
| 30 | +```bash |
| 31 | +pip install azure-mgmt-databricks |
| 32 | +pip install azure-identity |
| 33 | +``` |
31 | 34 |
|
32 |
| -To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) |
| 35 | +### Authentication |
33 | 36 |
|
| 37 | +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. |
34 | 38 |
|
| 39 | +- `AZURE_CLIENT_ID` for Azure client ID. |
| 40 | +- `AZURE_TENANT_ID` for Azure tenant ID. |
| 41 | +- `AZURE_CLIENT_SECRET` for Azure client secret. |
35 | 42 |
|
36 |
| -For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) |
37 |
| -Code samples for this package can be found at [Databricks Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. |
38 |
| -Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) |
| 43 | +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. |
39 | 44 |
|
| 45 | +With above configuration, client can be authenticated by following code: |
| 46 | + |
| 47 | +```python |
| 48 | +from azure.identity import DefaultAzureCredential |
| 49 | +from azure.mgmt.databricks import AzureDatabricksManagementClient |
| 50 | +import os |
| 51 | + |
| 52 | +sub_id = os.getenv("AZURE_SUBSCRIPTION_ID") |
| 53 | +client = AzureDatabricksManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id) |
| 54 | +``` |
| 55 | + |
| 56 | +## Examples |
| 57 | + |
| 58 | +Code samples for this package can be found at: |
| 59 | +- [Search Data Bricks Management](/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com |
| 60 | +- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) |
| 61 | + |
| 62 | + |
| 63 | +## Troubleshooting |
| 64 | + |
| 65 | +## Next steps |
40 | 66 |
|
41 | 67 | ## Provide Feedback
|
42 | 68 |
|
43 |
| -If you encounter any bugs or have suggestions, please file an issue in |
44 |
| -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) |
45 |
| -section of the project. |
| 69 | +If you encounter any bugs or have suggestions, please file an issue in the |
| 70 | +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) |
| 71 | +section of the project. |
| 72 | + |
46 | 73 |
|
47 |
| - |
| 74 | + |
48 | 75 |
|
0 commit comments