pypi Office365-REST-Python-Client 2.3.15
v 2.3.15

latest releases: 2.5.13, 2.5.12, 2.5.11...
23 months ago

Changelog

  • #569: fix for ClientRuntimeContext.execute_query_retry method by @jneuendorf
  • #584: escape password in _acquire_service_token_from_adfs-method by @chrisdecker1201
  • #568: support for passing private_key into with_client_certificate method
  • enhancements for SharePoint & OneDrive APIs

Enhancements for SharePoint & OneDrive APIs

Instantiate SharePoint client with certificate credentials

cert_path = 'selfsigncert.pem'
with open(cert_path, 'r') as f:
      private_key = open(cert_path).read()

cert_credentials = {
     'tenant': test_tenant,
     'client_id': '--client id--',
     'thumbprint': '--thumbprint--',
     'private_key': private_key
}
ctx = ClientContext(test_team_site_url).with_client_certificate(**cert_credentials)

Setting image field value

field_value = ImageFieldValue(image_url)
list_item.set_property(field_name, field_value).update().execute_query()

Don't miss a new Office365-REST-Python-Client release

NewReleases is sending notifications on new releases.