Skip to content

Commit 747ab0b

Browse files
committed
black formatting
1 parent 5d3ca94 commit 747ab0b

File tree

170 files changed

+181
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+181
-15
lines changed

examples/auth/gcc_high.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
Microsoft Graph for US Government L4: https://graph.microsoft.us
55
"""
6+
67
import msal
78

89
from office365.graph_client import GraphClient

examples/auth/interactive_custom.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#interactive-and-non-interactive-authentication
1111
"""
12+
1213
import msal
1314

1415
from office365.graph_client import GraphClient

examples/auth/interactive_sharepoint.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#interactive-and-non-interactive-authentication
1010
"""
11+
1112
import msal
1213

1314
from office365.runtime.auth.token_response import TokenResponse

examples/auth/register_sharepoint_apponly.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
4. upload certificate (public key)
1414
1515
"""
16+
1617
from office365.graph_client import GraphClient
1718
from tests import test_client_id, test_password, test_tenant, test_username
1819

examples/auth/with_adal.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Note: ADAL for Python is no longer receive new feature improvement. Its successor, MSAL for Python,
55
are now generally available.
66
"""
7+
78
from office365.graph_client import GraphClient
89
from tests import load_settings
910

examples/auth/with_client_secret.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
https://learn.microsoft.com/en-us/entra/identity-platform/msal-authentication-flows#client-credentials
99
"""
10+
1011
import msal
1112

1213
from office365.graph_client import GraphClient

examples/auth/with_user_creds.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://github.com/AzureAD/microsoft-authentication-library-for-python/wiki/Username-Password-Authentication
55
"""
6+
67
import msal
78

89
from office365.graph_client import GraphClient

examples/communications/create_call.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Create peer-to-peer VoIP call with service hosted media
33
"""
4+
45
from office365.graph_client import GraphClient
56
from tests import test_client_id, test_client_secret, test_tenant
67

examples/directory/applications/app_password.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Adds a strong password or secret to an application.
33
https://learn.microsoft.com/en-us/graph/api/application-addpassword?view=graph-rest-1.0
44
"""
5+
56
from office365.graph_client import GraphClient
67
from tests import (
78
test_client_credentials,

examples/directory/applications/get_by_app_id.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
You can address an application or a service principal by its ID or by its appId, where ID is referred to
77
as Object ID and appId is referred to as Application (client) ID on the Azure portal.
88
"""
9+
910
from office365.graph_client import GraphClient
1011
from tests import test_client_id, test_client_secret, test_tenant
1112

examples/directory/groups/create_m365.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0
88
"""
9+
910
from office365.graph_client import GraphClient
1011
from tests import (
1112
create_unique_name,

examples/directory/groups/delete_groups.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
https://learn.microsoft.com/en-us/graph/api/group-delete?view=graph-rest-1.0
1010
"""
11+
1112
from office365.graph_client import GraphClient
1213
from tests import test_client_id, test_password, test_tenant, test_username
1314

examples/directory/identity/list_provider.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/identitycontainer-list-identityproviders?view=graph-rest-1.0&tabs=http
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/directory/policies/get_auth_settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
https://learn.microsoft.com/en-us/graph/api/authorizationpolicy-get?view=graph-rest-1.0
55
66
"""
7+
78
from pprint import pprint
89

910
from office365.graph_client import GraphClient

examples/directory/roles/for_user.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/directoryrole-list?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/directory/roles/list.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/directoryrole-list?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/directory/users/assign_manager.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/user-post-manager?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import (
89
test_client_id,

examples/directory/users/export_personal_data.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/user-exportpersonaldata?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/directory/users/get_licenses.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/user-list-licensedetails?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/directory/users/get_my_activities.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Get activities for a given user
33
https://learn.microsoft.com/en-us/graph/api/projectrome-get-activities?view=graph-rest-1.0
44
"""
5+
56
from office365.graph_client import GraphClient
67
from tests import test_client_id, test_password, test_tenant, test_username
78

examples/informationprotection/create_mail_assessment.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Create a mail assessment request
33
44
"""
5+
56
from office365.graph_client import GraphClient
67
from tests import test_client_id, test_password, test_tenant, test_username
78

examples/onedrive/bundles/create.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/drive-post-bundles?view=graph-rest-1.0&tabs=http#example-1-create-a-bundle
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/columns/list_site.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/site-list-columns?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/driveitems/get_library_items.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/listitem-list?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import (
89
test_client_id,

examples/onedrive/drives/get_by_path.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Demonstrates how to get a drive by path.
33
"""
4+
45
from office365.graph_client import GraphClient
56
from tests import (
67
test_client_id,

examples/onedrive/drives/list.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/drive-list?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/onedrive/drives/list_followed_items.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/drives/list_recent_files.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/drive-recent?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/drives/list_shared_with_me.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/drive-sharedwithme?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/excel/get_cell.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/worksheet-cell?view=graph-rest-1.0
55
"""
6+
67
import sys
78

89
from office365.graph_client import GraphClient

examples/onedrive/excel/read_table.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0#get-list-of-table-rows
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/files/copy_file.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
https://learn.microsoft.com/en-us/graph/api/driveitem-copy?view=graph-rest-1.0
66
"""
7+
78
from office365.graph_client import GraphClient
89
from tests import test_client_id, test_password, test_tenant, test_username
910

examples/onedrive/files/download.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0
55
"""
6+
67
import os
78
import tempfile
89

examples/onedrive/files/get_by_abs_url.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Retrieves file by absolute url
33
"""
4+
45
from office365.graph_client import GraphClient
56
from tests import (
67
test_client_id,

examples/onedrive/files/list_versions.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/driveitem-list-versions?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/onedrive/files/move_file.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
https://learn.microsoft.com/en-us/graph/api/driveitem-move?view=graph-rest-1.0
66
"""
7+
78
from office365.graph_client import GraphClient
89
from office365.onedrive.driveitems.conflict_behavior import ConflictBehavior
910
from tests import test_client_id, test_password, test_tenant, test_username
@@ -16,5 +17,7 @@
1617
source_file = client.me.drive.root.upload_file(local_path).execute_query()
1718
target_path = "archive/2018"
1819
target_folder = client.me.drive.root.get_by_path(target_path)
19-
target_file = source_file.move(parent=target_folder, conflict_behavior=ConflictBehavior.Replace).execute_query()
20+
target_file = source_file.move(
21+
parent=target_folder, conflict_behavior=ConflictBehavior.Replace
22+
).execute_query()
2023
print(target_file.web_url)

examples/onedrive/files/send_sharing_invitation.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-1.0
88
"""
9+
910
from datetime import datetime, timedelta
1011

1112
from office365.graph_client import GraphClient

examples/onedrive/folders/create.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/driveitem-post-children?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import create_unique_name, test_client_id, test_client_secret, test_tenant
89

examples/onedrive/folders/list_files.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Gets folders from drive
33
https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0
44
"""
5+
56
from office365.graph_client import GraphClient
67
from tests import (
78
test_client_id,

examples/onedrive/folders/list_folders.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Gets folders from drive
33
https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0
44
"""
5+
56
from office365.graph_client import GraphClient
67
from tests import (
78
test_client_id,

examples/onedrive/lists/create_list.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
https://learn.microsoft.com/en-us/graph/api/list-create?view=graph-rest-1.0
77
"""
8+
89
from office365.graph_client import GraphClient
910
from tests import create_unique_name, test_client_id, test_client_secret, test_tenant
1011

examples/onedrive/sitepages/create.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/sitepage-create?view=graph-rest-beta
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/onedrive/sites/get_all.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/site-getallsites?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_tenant
89

examples/onedrive/sites/get_by_url.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/site-get?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_client_secret, test_team_site_url, test_tenant
89

examples/onedrive/termstore/export_term_store.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Demonstrates how to retrieve a flat list of all TermSet objects
33
"""
4+
45
from office365.graph_client import GraphClient
56
from tests import test_client_id, test_client_secret, test_team_site_url, test_tenant
67

examples/onedrive/workbook/populate_template.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

examples/onedrive/workbook/read_workbook.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Get workbook
33
"""
4+
45
from office365.graph_client import GraphClient
56
from tests import (
67
test_client_id,

examples/onedrive/workbook/work_with_excel.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
55
"""
6+
67
from office365.graph_client import GraphClient
78
from tests import test_client_id, test_password, test_tenant, test_username
89

0 commit comments

Comments
 (0)