Office365-REST-Python-Client 2.5.1__py3-none-any.whl → 2.5.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/METADATA +6 -6
- {Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/RECORD +265 -259
- office365/base_item.py +12 -20
- office365/communications/onlinemeetings/collection.py +1 -1
- office365/communications/onlinemeetings/online_meeting.py +20 -35
- office365/communications/presences/presence.py +18 -7
- office365/delta_collection.py +10 -1
- office365/delta_path.py +1 -1
- office365/directory/administrative_unit.py +6 -7
- office365/directory/applications/application.py +24 -18
- office365/directory/applications/roles/assignment.py +13 -1
- office365/directory/applications/roles/collection.py +13 -0
- office365/directory/applications/roles/role.py +6 -1
- office365/directory/audit/directory.py +8 -7
- office365/directory/audit/log_root.py +3 -0
- office365/directory/audit/signins/signin.py +19 -29
- office365/directory/authentication/authentication.py +1 -0
- office365/directory/authentication/methods/details.py +8 -6
- office365/directory/authentication/methods/phone.py +3 -1
- office365/directory/extensions/extension_property.py +7 -9
- office365/directory/groups/collection.py +10 -3
- office365/directory/groups/group.py +19 -19
- office365/directory/groups/lifecycle_policy.py +8 -7
- office365/directory/identities/provider.py +5 -6
- office365/directory/insights/usage_details.py +8 -3
- office365/directory/internal/paths/me.py +1 -1
- office365/directory/invitations/collection.py +1 -1
- office365/directory/invitations/invitation.py +6 -6
- office365/directory/object_collection.py +2 -3
- office365/directory/permissions/email_identity.py +7 -0
- office365/directory/permissions/grants/resource_specific.py +10 -9
- office365/directory/permissions/identity.py +3 -0
- office365/directory/permissions/identity_set.py +3 -0
- office365/directory/policies/base.py +4 -4
- office365/directory/policies/root.py +6 -4
- office365/directory/protection/information.py +3 -3
- office365/directory/rolemanagement/application.py +2 -0
- office365/directory/rolemanagement/role.py +11 -10
- office365/directory/rolemanagement/template.py +9 -8
- office365/directory/rolemanagement/unified_role_assignment.py +5 -4
- office365/directory/rolemanagement/unified_role_definition.py +6 -4
- office365/directory/security/security.py +3 -0
- office365/directory/serviceprincipals/collection.py +20 -4
- office365/directory/serviceprincipals/service_principal.py +79 -12
- office365/directory/users/activities/activity.py +5 -4
- office365/directory/users/user.py +29 -34
- office365/entity.py +2 -2
- office365/entity_collection.py +12 -5
- office365/graph_client.py +90 -8
- office365/intune/audit/event.py +4 -3
- office365/intune/devices/enrollment/configuration.py +6 -4
- office365/intune/devices/managed.py +9 -12
- office365/onedrive/analytics/item_activity_stat.py +4 -3
- office365/onedrive/columns/column_link.py +4 -4
- office365/onedrive/columns/definition.py +29 -32
- office365/onedrive/columns/definition_collection.py +1 -1
- office365/onedrive/contenttypes/content_type.py +16 -18
- office365/onedrive/documentsets/version.py +7 -3
- office365/onedrive/driveitems/driveItem.py +48 -49
- office365/onedrive/drives/drive.py +7 -2
- office365/onedrive/internal/paths/children.py +2 -2
- office365/onedrive/internal/paths/root.py +1 -1
- office365/onedrive/internal/paths/shared.py +1 -1
- office365/onedrive/internal/paths/site.py +3 -3
- office365/onedrive/internal/paths/url.py +2 -2
- office365/onedrive/listitems/list_item.py +2 -0
- office365/onedrive/lists/list.py +7 -4
- office365/onedrive/permissions/collection.py +28 -7
- office365/onedrive/permissions/permission.py +5 -7
- office365/onedrive/permissions/sharing_link.py +1 -1
- office365/onedrive/sharepoint.py +1 -0
- office365/onedrive/shares/collection.py +2 -5
- office365/onedrive/shares/drive_item.py +4 -0
- office365/onedrive/sites/site.py +6 -0
- office365/onedrive/termstore/groups/collection.py +3 -8
- office365/onedrive/termstore/groups/group.py +8 -0
- office365/onedrive/termstore/sets/collection.py +2 -6
- office365/onedrive/termstore/sets/name.py +5 -0
- office365/onedrive/termstore/sets/set.py +7 -0
- office365/onedrive/termstore/store.py +10 -13
- office365/onedrive/versions/drive_item.py +3 -1
- office365/onedrive/workbooks/ranges/range.py +9 -13
- office365/onedrive/workbooks/ranges/view.py +1 -0
- office365/onedrive/workbooks/tables/rows/row.py +3 -0
- office365/onedrive/workbooks/tables/table.py +7 -4
- office365/onedrive/workbooks/worksheets/worksheet.py +12 -4
- office365/onenote/entity_hierarchy_model.py +4 -0
- office365/onenote/internal/multipart_page_query.py +4 -5
- office365/onenote/notebooks/notebook.py +4 -0
- office365/onenote/pages/collection.py +3 -2
- office365/onenote/resources/resource.py +5 -4
- office365/onenote/sectiongroups/section_group.py +10 -7
- office365/onenote/sections/section.py +1 -1
- office365/outlook/calendar/attendees/base.py +2 -1
- office365/outlook/calendar/calendar.py +18 -10
- office365/outlook/calendar/events/collection.py +0 -2
- office365/outlook/calendar/group.py +7 -8
- office365/outlook/calendar/meetingtimes/suggestion.py +8 -4
- office365/outlook/calendar/meetingtimes/time_slot.py +3 -0
- office365/outlook/calendar/permissions/collection.py +1 -1
- office365/outlook/calendar/rooms/__init__.py +0 -0
- office365/outlook/calendar/rooms/list.py +27 -0
- office365/outlook/calendar/rooms/room.py +8 -0
- office365/outlook/calendar/schedule/information.py +0 -1
- office365/outlook/contacts/collection.py +0 -8
- office365/outlook/contacts/contact.py +14 -14
- office365/outlook/contacts/folder.py +3 -0
- office365/outlook/mail/attachments/attachment.py +31 -31
- office365/outlook/mail/attachments/collection.py +34 -6
- office365/outlook/mail/conversation.py +6 -4
- office365/outlook/mail/folders/collection.py +0 -7
- office365/outlook/mail/folders/folder.py +50 -18
- office365/outlook/mail/messages/collection.py +0 -1
- office365/outlook/mail/messages/message.py +58 -68
- office365/outlook/mail/physical_address.py +11 -5
- office365/outlook/mail/recipient.py +3 -1
- office365/outlook/mail/recurrence_range.py +14 -6
- office365/outlook/user.py +1 -0
- office365/planner/planner.py +9 -12
- office365/planner/plans/collection.py +17 -18
- office365/planner/plans/container.py +11 -0
- office365/planner/plans/plan.py +21 -10
- office365/runtime/auth/authentication_context.py +3 -3
- office365/runtime/auth/providers/acs_token_provider.py +7 -9
- office365/runtime/auth/providers/saml_token_provider.py +5 -2
- office365/runtime/client_object.py +6 -15
- office365/runtime/client_object_collection.py +36 -35
- office365/runtime/client_result.py +6 -7
- office365/runtime/client_runtime_context.py +10 -16
- office365/runtime/client_value_collection.py +3 -10
- office365/runtime/compat.py +2 -0
- office365/runtime/odata/query_options.py +1 -3
- office365/runtime/odata/reader.py +1 -1
- office365/runtime/odata/request.py +2 -4
- office365/runtime/odata/type.py +17 -0
- office365/runtime/odata/v4/upload_session_request.py +27 -30
- office365/runtime/paths/appid.py +1 -1
- office365/runtime/{odata/url_builder.py → paths/builder.py} +24 -9
- office365/runtime/paths/item.py +3 -1
- office365/runtime/paths/resource_path.py +12 -16
- office365/runtime/paths/service_operation.py +8 -7
- office365/runtime/paths/v3/__init__.py +0 -0
- office365/runtime/paths/{key.py → v3/entity.py} +5 -5
- office365/runtime/paths/v4/__init__.py +0 -0
- office365/runtime/paths/{entity.py → v4/entity.py} +13 -11
- office365/runtime/queries/function.py +1 -1
- office365/runtime/types/event_handler.py +1 -3
- office365/search/entity.py +15 -8
- office365/search/external/external.py +1 -0
- office365/search/sort_property.py +3 -0
- office365/sharepoint/attachments/attachment.py +3 -1
- office365/sharepoint/attachments/collection.py +3 -0
- office365/sharepoint/changes/change.py +12 -1
- office365/sharepoint/changes/collection.py +1 -1
- office365/sharepoint/changes/list.py +3 -0
- office365/sharepoint/changes/token.py +4 -0
- office365/sharepoint/changes/type.py +23 -23
- office365/sharepoint/changes/web.py +7 -3
- office365/sharepoint/client_context.py +21 -18
- office365/sharepoint/clientsidecomponent/hostedapps/manager.py +3 -3
- office365/sharepoint/contenttypes/content_type.py +47 -56
- office365/sharepoint/contenttypes/content_type_id.py +1 -1
- office365/sharepoint/documentmanagement/document_id.py +2 -2
- office365/sharepoint/documentmanagement/document_set.py +6 -7
- office365/sharepoint/entity_collection.py +9 -0
- office365/sharepoint/features/feature.py +6 -8
- office365/sharepoint/fields/collection.py +6 -5
- office365/sharepoint/fields/field.py +28 -46
- office365/sharepoint/fields/related_field_collection.py +1 -1
- office365/sharepoint/fields/user_value.py +3 -3
- office365/sharepoint/files/checked_out_file.py +4 -2
- office365/sharepoint/files/checked_out_file_collection.py +1 -1
- office365/sharepoint/files/collection.py +84 -14
- office365/sharepoint/files/file.py +118 -110
- office365/sharepoint/files/versions/collection.py +5 -3
- office365/sharepoint/files/versions/event.py +6 -3
- office365/sharepoint/files/versions/version.py +31 -18
- office365/sharepoint/folders/collection.py +5 -10
- office365/sharepoint/folders/folder.py +41 -24
- office365/sharepoint/forms/collection.py +1 -1
- office365/sharepoint/forms/form.py +4 -4
- office365/sharepoint/internal/paths/static_operation.py +9 -0
- office365/sharepoint/internal/paths/web.py +20 -0
- office365/sharepoint/listitems/collection.py +4 -0
- office365/sharepoint/listitems/listitem.py +37 -38
- office365/sharepoint/listitems/versions/collection.py +1 -1
- office365/sharepoint/listitems/versions/version.py +18 -11
- office365/sharepoint/lists/collection.py +1 -2
- office365/sharepoint/lists/list.py +106 -153
- office365/sharepoint/marketplace/app_metadata_collection.py +3 -1
- office365/sharepoint/navigation/node.py +16 -15
- office365/sharepoint/navigation/node_collection.py +9 -3
- office365/sharepoint/permissions/base_permissions.py +11 -6
- office365/sharepoint/permissions/roles/assignments/collection.py +8 -12
- office365/sharepoint/permissions/roles/definitions/definition.py +3 -1
- office365/sharepoint/permissions/securable_object.py +38 -31
- office365/sharepoint/portal/groups/service.py +12 -16
- office365/sharepoint/portal/groups/site_manager.py +0 -1
- office365/sharepoint/principal/groups/group.py +24 -30
- office365/sharepoint/principal/principal.py +21 -19
- office365/sharepoint/principal/users/collection.py +5 -0
- office365/sharepoint/principal/users/user.py +20 -26
- office365/sharepoint/publishing/pages/collection.py +1 -4
- office365/sharepoint/publishing/pages/metadata.py +38 -51
- office365/sharepoint/publishing/pages/metadata_collection.py +5 -2
- office365/sharepoint/publishing/pages/page.py +12 -21
- office365/sharepoint/publishing/pages/reposts/repost.py +5 -9
- office365/sharepoint/publishing/pages/service.py +36 -49
- office365/sharepoint/pushnotifications/collection.py +3 -1
- office365/sharepoint/recyclebin/item.py +11 -9
- office365/sharepoint/recyclebin/item_collection.py +1 -1
- office365/sharepoint/search/service.py +8 -6
- office365/sharepoint/sharing/links/info.py +5 -2
- office365/sharepoint/sharing/links/share_response.py +3 -0
- office365/sharepoint/sharing/links/share_settings.py +3 -0
- office365/sharepoint/sharing/object_sharing_information.py +25 -19
- office365/sharepoint/sharing/object_sharing_information_user.py +10 -19
- office365/sharepoint/sharing/result.py +18 -41
- office365/sharepoint/sharing/role.py +20 -0
- office365/sharepoint/sharing/role_type.py +1 -0
- office365/sharepoint/sharing/user_sharing_result.py +12 -0
- office365/sharepoint/sites/language.py +6 -0
- office365/sharepoint/sites/language_collection.py +3 -0
- office365/sharepoint/sites/site.py +65 -86
- office365/sharepoint/storagemetrics/storage_metrics.py +5 -6
- office365/sharepoint/taxonomy/item.py +11 -10
- office365/sharepoint/taxonomy/stores/store.py +8 -8
- office365/sharepoint/taxonomy/terms/label.py +3 -0
- office365/sharepoint/taxonomy/terms/term.py +31 -0
- office365/sharepoint/tenant/administration/collaboration/insights_overview.py +10 -0
- office365/sharepoint/tenant/administration/hubsites/collection.py +1 -2
- office365/sharepoint/tenant/administration/hubsites/hub_site.py +20 -24
- office365/sharepoint/tenant/administration/internal/permission_grant.py +7 -0
- office365/sharepoint/tenant/administration/sites/properties.py +55 -44
- office365/sharepoint/tenant/administration/tenant.py +69 -69
- office365/sharepoint/types/resource_path.py +2 -2
- office365/sharepoint/ui/applicationpages/peoplepicker/query_parameters.py +1 -1
- office365/sharepoint/usercustomactions/collection.py +1 -2
- office365/sharepoint/userprofiles/my_site_links.py +4 -4
- office365/sharepoint/userprofiles/people_manager.py +1 -3
- office365/sharepoint/userprofiles/user_profile.py +9 -11
- office365/sharepoint/utilities/principal_info.py +12 -0
- office365/sharepoint/viva/employee_engagement.py +1 -1
- office365/sharepoint/webparts/definition_collection.py +1 -1
- office365/sharepoint/webs/collection.py +8 -0
- office365/sharepoint/webs/template_collection.py +3 -5
- office365/sharepoint/webs/web.py +75 -95
- office365/subscriptions/collection.py +1 -1
- office365/subscriptions/subscription.py +13 -11
- office365/teams/apps/app.py +1 -0
- office365/teams/channels/channel.py +1 -3
- office365/teams/collection.py +12 -16
- office365/teams/info.py +7 -4
- office365/teams/members/conversation_collection.py +1 -3
- office365/teams/operations/async_operation.py +3 -5
- office365/teams/schedule/groups/group.py +3 -0
- office365/teams/team.py +18 -20
- office365/todo/attachments/base.py +7 -9
- office365/todo/linked_resource.py +6 -6
- office365/todo/tasks/list.py +1 -0
- office365/todo/tasks/task.py +3 -0
- office365/onedrive/internal/queries/resumable_file_upload.py +0 -36
- office365/outlook/internal/queries/attachment_upload.py +0 -53
- office365/runtime/odata/path_builder.py +0 -23
- office365/sharepoint/internal/key_value.py +0 -28
- office365/sharepoint/internal/queries/create_file.py +0 -20
- office365/sharepoint/internal/queries/upload_session.py +0 -103
- {Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/top_level.txt +0 -0
- /office365/planner/plans/{plan_details.py → details.py} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
|
-
from office365.sharepoint.files.creation_information import FileCreationInformation
|
|
3
|
-
from office365.sharepoint.files.file import File
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def create_file_query(binding_type, name, content=None):
|
|
7
|
-
"""
|
|
8
|
-
Constructs a query to create/upload a file
|
|
9
|
-
|
|
10
|
-
:type name: str
|
|
11
|
-
:type content: str or None
|
|
12
|
-
:type binding_type: office365.sharepoint.files.collection.FileCollection
|
|
13
|
-
"""
|
|
14
|
-
return_type = File(binding_type.context)
|
|
15
|
-
binding_type.add_child(return_type)
|
|
16
|
-
create_info = FileCreationInformation(url=name, overwrite=True)
|
|
17
|
-
qry = ServiceOperationQuery(
|
|
18
|
-
binding_type, "add", create_info.to_json(), content, None, return_type
|
|
19
|
-
)
|
|
20
|
-
return qry
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import uuid
|
|
3
|
-
|
|
4
|
-
from office365.runtime.client_result import ClientResult
|
|
5
|
-
from office365.sharepoint.files.file import File
|
|
6
|
-
from office365.sharepoint.internal.queries.create_file import create_file_query
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def create_upload_session_query_ex(
|
|
10
|
-
binding_type, path_or_file, chunk_size, chunk_uploaded, **kwargs
|
|
11
|
-
):
|
|
12
|
-
"""
|
|
13
|
-
:type binding_type: office365.sharepoint.files.collection.FileCollection
|
|
14
|
-
:type path_or_file: typing.IO or str
|
|
15
|
-
:type chunk_size: int
|
|
16
|
-
:type chunk_uploaded: (int, *)->None
|
|
17
|
-
"""
|
|
18
|
-
if hasattr(path_or_file, "read"):
|
|
19
|
-
return create_upload_session_query(
|
|
20
|
-
binding_type, path_or_file, chunk_size, chunk_uploaded, **kwargs
|
|
21
|
-
)
|
|
22
|
-
else:
|
|
23
|
-
f = open(path_or_file, "rb")
|
|
24
|
-
return create_upload_session_query(
|
|
25
|
-
binding_type, f, chunk_size, chunk_uploaded, True, **kwargs
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def create_upload_session_query(
|
|
30
|
-
binding_type,
|
|
31
|
-
file_object,
|
|
32
|
-
chunk_size,
|
|
33
|
-
chunk_uploaded,
|
|
34
|
-
force_close=False,
|
|
35
|
-
file_size=None,
|
|
36
|
-
file_name=None,
|
|
37
|
-
**kwargs
|
|
38
|
-
):
|
|
39
|
-
"""
|
|
40
|
-
:type binding_type: office365.sharepoint.files.collection.FileCollection
|
|
41
|
-
:type file_object: typing.IO
|
|
42
|
-
:type chunk_size: int
|
|
43
|
-
:type force_close: bool
|
|
44
|
-
:type chunk_uploaded: (int, *)->None
|
|
45
|
-
:type file_size: int
|
|
46
|
-
:type file_name: str
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
upload_id = str(uuid.uuid4())
|
|
50
|
-
file_size = file_size if file_size else os.fstat(file_object.fileno()).st_size
|
|
51
|
-
file_name = file_name if file_name else os.path.basename(file_object.name)
|
|
52
|
-
|
|
53
|
-
def _read_next():
|
|
54
|
-
return file_object.read(chunk_size)
|
|
55
|
-
|
|
56
|
-
def _has_pending_read():
|
|
57
|
-
bytes_read = file_object.tell()
|
|
58
|
-
return bytes_read < file_size
|
|
59
|
-
|
|
60
|
-
def _run_upload(response, return_type, next_return_type=None):
|
|
61
|
-
"""
|
|
62
|
-
:type return_type: File
|
|
63
|
-
:type response: requests.Response
|
|
64
|
-
"""
|
|
65
|
-
response.raise_for_status()
|
|
66
|
-
|
|
67
|
-
uploaded_bytes = 0
|
|
68
|
-
if isinstance(next_return_type, ClientResult):
|
|
69
|
-
uploaded_bytes = int(next_return_type.value)
|
|
70
|
-
elif isinstance(next_return_type, File):
|
|
71
|
-
uploaded_bytes = next_return_type.length
|
|
72
|
-
|
|
73
|
-
if callable(chunk_uploaded):
|
|
74
|
-
chunk_uploaded(uploaded_bytes, **kwargs)
|
|
75
|
-
|
|
76
|
-
if not _has_pending_read():
|
|
77
|
-
if force_close and not file_object.closed:
|
|
78
|
-
file_object.close()
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
content = _read_next()
|
|
82
|
-
if uploaded_bytes == 0:
|
|
83
|
-
next_return_type = return_type.start_upload(upload_id, content)
|
|
84
|
-
elif uploaded_bytes + len(content) < file_size:
|
|
85
|
-
next_return_type = return_type.continue_upload(
|
|
86
|
-
upload_id, uploaded_bytes, content
|
|
87
|
-
)
|
|
88
|
-
else:
|
|
89
|
-
next_return_type = return_type.finish_upload(
|
|
90
|
-
upload_id, uploaded_bytes, content
|
|
91
|
-
)
|
|
92
|
-
binding_type.context.after_execute(
|
|
93
|
-
_run_upload, return_type=return_type, next_return_type=next_return_type
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
if file_size > chunk_size:
|
|
97
|
-
qry = create_file_query(binding_type, file_name)
|
|
98
|
-
binding_type.context.after_execute(
|
|
99
|
-
_run_upload, return_type=qry.return_type, next_return_type=qry.return_type
|
|
100
|
-
)
|
|
101
|
-
return qry
|
|
102
|
-
else:
|
|
103
|
-
return create_file_query(binding_type, file_name, file_object.read())
|
|
File without changes
|
{Office365_REST_Python_Client-2.5.1.dist-info → Office365_REST_Python_Client-2.5.3.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|