Skip to content

Commit 0e45705

Browse files
committed
feat: readme formatting to trigger release please
1 parent c172013 commit 0e45705

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1+
# Microsoft Graph SDK for Python
2+
13
[![PyPI version](https://badge.fury.io/py/msgraph-sdk.svg)](https://badge.fury.io/py/msgraph-sdk)
24
[![Downloads](https://pepy.tech/badge/msgraph-sdk)](https://pepy.tech/project/msgraph-sdk)
35
[![Supported Versions](https://img.shields.io/pypi/pyversions/msgraph-sdk.svg)](https://pypi.org/project/msgraph-sdk)
46
[![Contributors](https://img.shields.io/github/contributors/microsoftgraph/msgraph-sdk-python.svg)](https://github.com/microsoftgraph/msgraph-sdk-python/graphs/contributors)
57

6-
# Microsoft Graph SDK for Python
7-
88
Get started with the Microsoft Graph SDK for Python by integrating the [Microsoft Graph API](https://docs.microsoft.com/graph/overview) into your Python application.
99

10-
> **Note:**
10+
> **Note:**
11+
>
1112
> * This SDK allows you to build applications using the [v1.0](https://docs.microsoft.com/graph/use-the-api#version) of Microsoft Graph. If you want to try the latest Microsoft Graph APIs, try the [beta](https://github.com/microsoftgraph/msgraph-beta-sdk-python) SDK.
1213
1314
## 1. Installation
1415

1516
```py
1617
pip install msgraph-sdk
1718
```
18-
> **Note:**
19+
20+
> **Note:**
21+
>
1922
> * The Microsoft Graph SDK for Python is a fairly large package. It may take a few minutes for the initial installation to complete.
2023
> * Enable long paths in your environment if you receive a `Could not install packages due to an OSError`. For details, see [Enable Long Paths in Windows 10, Version 1607, and Later](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#enable-long-paths-in-windows-10-version-1607-and-later).
2124
@@ -32,10 +35,11 @@ To start writing code and making requests to the Microsoft Graph service, you ne
3235
> **Note**: For authentication we support both `sync` and `async` credential classes from `azure.identity`. Please see the azure identity [docs](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity?view=azure-python) for more information.
3336
3437
The easiest way to filter this decision is by looking at the permissions set you'd use. Microsoft Graph supports 2 different types of permissions: delegated and application permissions:
35-
- Application permissions are used when you don’t need a user to login to your app, but the app will perform tasks on its own and run in the background.
36-
- Delegated permissions, also called scopes, are used when your app requires a user to login and interact with data related to this user in a session.
3738

38-
The following table lists common libraries by permissions set.
39+
* Application permissions are used when you don’t need a user to login to your app, but the app will perform tasks on its own and run in the background.
40+
* Delegated permissions, also called scopes, are used when your app requires a user to login and interact with data related to this user in a session.
41+
42+
The following table lists common libraries by permissions set.
3943
| MSAL library | Permissions set | Common use case |
4044
|---|---|---|
4145
| [ClientSecretCredential](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.aio.clientsecretcredential?view=azure-python&preserve-view=true) | Application permissions | Daemon apps or applications running in the background without a signed-in user. |
@@ -46,6 +50,7 @@ The following table lists common libraries by permissions set.
4650
You can also use [EnvironmentCredential](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.environmentcredential?view=azure-python), [DefaultAzureCredential](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.defaultazurecredential?view=azure-python), [OnBehalfOfCredential](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.onbehalfofcredential?view=azure-python), or any other [Azure Identity library](https://learn.microsoft.com/en-us/python/api/overview/azure/identity-readme?view=azure-python#credential-classes).
4751

4852
Once you've picked an authentication library, we can initiate the authentication provider in your app. The following example uses ClientSecretCredential with application permissions.
53+
4954
```python
5055
import asyncio
5156

@@ -58,6 +63,7 @@ scopes = ['https://graph.microsoft.com/.default']
5863
```
5964

6065
The following example uses DeviceCodeCredentials with delegated permissions.
66+
6167
```python
6268
import asyncio
6369

@@ -157,6 +163,7 @@ asyncio.run(me())
157163
### 3.1 Error Handling
158164

159165
Failed requests raise `APIError` exceptions. You can handle these exceptions using `try` `catch` statements.
166+
160167
```py
161168
from kiota_abstractions.api_error import APIError
162169
async def get_user():
@@ -168,8 +175,10 @@ async def get_user():
168175
asyncio.run(get_user())
169176
```
170177

171-
### 3.2 Pagination
178+
### 3.2 Pagination
179+
172180
By default a maximum of 100 rows are returned but in the response if odata_next_link is present, it can be used to fetch the next batch of max 100 rows. Here's an example to fetch the initial rows of members in a group, then iterate over the pages of rows using the odata_next_link
181+
173182
```py
174183
# get group members
175184
members = await client.groups.by_group_id(id).members.get()
@@ -199,7 +208,6 @@ By default a maximum of 100 rows are returned but in the response if odata_next_
199208

200209
For detailed information on breaking changes, bug fixes and new functionality introduced during major upgrades, check out our [Upgrade Guide](UPGRADING.md)
201210

202-
203211
## Issues
204212

205213
View or log issues on the [Issues](https://github.com/microsoftgraph/msgraph-sdk-python/issues) tab in the repo.
@@ -215,4 +223,5 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT
215223
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
216224

217225
## Third Party Notices
226+
218227
[Third-party notices](THIRD%20PARTY%20NOTICES)

0 commit comments

Comments
 (0)