Office365-REST-Python-Client

Microsoft 365 & Microsoft Graph Library for Python

MIT License

Downloads
7.9M
Stars
1.2K
Committers
46

Bot releases are hidden (Show)

Office365-REST-Python-Client - Bug fixes for 2.1.8 and publish package to PyPi

Published by vgrem over 4 years ago

Bug fixes (#183) and publish package to PyPi (PR #184)

Office365-REST-Python-Client - v 2.1.8

Published by vgrem over 4 years ago

Support for simplified methods to authenticate against SharePoint

Now for user credentials flow, instead of

ctx_auth = AuthenticationContext(url=site_url)
ctx_auth.acquire_token_for_user(username,password):
ctx = ClientContext(site_url, ctx_auth)

an authenticated client could be initialized like this:

ctx = ClientContext.connect_with_credentials(site_url, UserCredential(username,password))

and for client credentials flow (aka SharePoint App-Only) instead of

ctx_auth = AuthenticationContext(url=site_url)
ctx_auth.acquire_token_for_app(client_id,client_secret):
ctx = ClientContext(site_url, ctx_auth)

like this:

ctx = ClientContext.connect_with_credentials(site_url, ClientCredential(client_id,client_secret))

Introduced support for provision modern Team & Communication sites (#179)

Examples

Create a Team Site

client = ClientContext.connect_with_credentials(url,ClientCredential(client_id,client_secret))
site_manager = GroupSiteManager(client)
info = site_manager.create_group_ex("Team Site", "teamsite", True, None)
client.execute_query()

Create a Communication site

client = ClientContext.connect_with_credentials(url,ClientCredential(client_id,client_secret))
site_manager = SPSiteManager(client)
request = SPSiteCreationRequest("CommSite", "https://contoso.sharepoint.com/sites/commsite")
response = site_manager.create(request)
client.execute_query()

Bug fixes and feature requests

  • #174 and #28 - a bug which prevented to authenticate successfully with user credentials on not root site collections or a sub sites
  • #181 - missing types
  • #178 - introduced support for provision modern Team & Communication sites
Office365-REST-Python-Client - v 2.1.7

Published by vgrem over 4 years ago

  • Support for SAML-based federated authentication with SharePoint Online

  • Bug fixes and feature requests: #170 #171

Office365-REST-Python-Client - v 2.1.6-1

Published by vgrem over 4 years ago

Mainly unit testing bug fixes for Travis CI

Office365-REST-Python-Client - v 2.1.6

Published by vgrem over 4 years ago

The list of changes:

One Drive API:

SharePoint API:

support for chunk file upload, for example:


ctx = ClientContext(site_url, ctx_auth)
size_1Mb = 1000000
local_path = "./data/big_buck_bunny.mp4"
target_url = "/Shared Documents"

result_file = ctx.web.get_folder_by_server_relative_url(target_url)
       .files.create_upload_session(local_path, size_1Mb, print_upload_progress)
ctx.execute_query()

Office365-REST-Python-Client - v 2.1.5

Published by vgrem almost 5 years ago

Release changes:

  • GraphClient client has been introduced for working with Microsoft Graph endpoint
  • CAML query builder has been introduced (credit goes to @domdinicola)
Office365-REST-Python-Client - v 2.1.4

Published by vgrem about 5 years ago

  • introduced support for Introduced support for SharePoint 2010 list data service, ListDataService class

  • added methods and properties for List, ListItem and Field resources:

    • ListItem.validate_update_listItem method - Validates and sets the values of the specified collection of fields for the list item.
    • ListItem.system_update method
    • ListItem.update_overwrite_version method
    • ListItem.parent_list navigation property
    • List.fields navigation property
    • FieldCollection.add method
    • FieldCollection.get_by_id method
    • FieldCollection.get_by_internal_name_or_title method
    • FieldCollection.get_by_title method
    • Field.update method
    • Field.delete method
Office365-REST-Python-Client - v 2.1.3

Published by vgrem over 5 years ago

  • Added support for NTLM authentication #110

  • Switch context per web #111

All the credit goes to @Aisbergg for those changes!

Office365-REST-Python-Client - v 2.1.2

Published by vgrem over 5 years ago

  • Outlook client transitioned from Office 365 Outlook REST API to Microsoft Graph-based Outlook REST API

  • introduced support for for Resource Owner Password Credential (ROPC) flow, which is suitable for scenarios where BasicAuth (discontinued nowadays) was utilized before

Office365-REST-Python-Client - v 2.1.1

Published by vgrem over 6 years ago

Introduced support for SharePoint authentication via OAuth (app principal) and SharePoint CAML queries