Skip to content

Commit 19d8d22

Browse files
committed
Packaging update of azure-mgmt-scheduler
1 parent c89c669 commit 19d8d22

3 files changed

Lines changed: 49 additions & 11 deletions

File tree

sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include _meta.json
22
recursive-include tests *.py *.json
3+
recursive-include samples *.py *.md
34
include *.md
45
include azure/__init__.py
56
include azure/mgmt/__init__.py

sdk/scheduler/azure-mgmt-scheduler/README.md

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,52 @@ For a more complete view of Azure libraries, see the [azure sdk python release](
88

99
_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_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/scheduler)
17-
Code samples for this package can be found at [Scheduler Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://github.com/Azure-Samples/azure-samples-python-management/tree/main/samples/scheduler)
15+
- Python 3.7+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-scheduler
22+
pip install azure-identity
23+
```
24+
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.scheduler import SchedulerManagementClient
40+
import os
41+
42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = SchedulerManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
45+
46+
## Examples
47+
48+
49+
Code samples for this package can be found at [Scheduler Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
50+
51+
52+
## Troubleshooting
53+
54+
## Next steps
55+
56+
## Provide Feedback
2257

2358
If you encounter any bugs or have suggestions, please file an issue in the
2459
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)

sdk/scheduler/azure-mgmt-scheduler/setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@
4747
url='https://github.com/Azure/azure-sdk-for-python',
4848
keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product
4949
classifiers=[
50-
'Development Status :: 7 - Inactive',
50+
'Development Status :: 5 - Production/Stable',
5151
'Programming Language :: Python',
5252
'Programming Language :: Python :: 3 :: Only',
5353
'Programming Language :: Python :: 3',
5454
'Programming Language :: Python :: 3.7',
5555
'Programming Language :: Python :: 3.8',
5656
'Programming Language :: Python :: 3.9',
5757
'Programming Language :: Python :: 3.10',
58+
'Programming Language :: Python :: 3.11',
5859
'License :: OSI Approved :: MIT License',
5960
],
6061
zip_safe=False,
@@ -69,9 +70,10 @@
6970
'pytyped': ['py.typed'],
7071
},
7172
install_requires=[
72-
'msrest>=0.7.1',
73-
'azure-common~=1.1',
74-
'azure-mgmt-core>=1.3.2,<2.0.0',
73+
"msrest>=0.7.1",
74+
"azure-common~=1.1",
75+
"azure-mgmt-core>=1.3.2,<2.0.0",
76+
"typing-extensions>=4.3.0; python_version<'3.8.0'",
7577
],
7678
python_requires=">=3.7"
7779
)

0 commit comments

Comments
 (0)