Skip to content

Releases: vgrem/Office365-REST-Python-Client

v 2.5.4

24 Dec 14:25
Compare
Choose a tag to compare

Changelog

  • #794 SharePoint authentication support with GCC High Environments by @DEADSCOP
  • #802 fix listing folders insted of listing files by @Yusuf-ASM
  • #801 fix for addressing shared drive items

v 2.5.3

06 Dec 20:40
Compare
Choose a tag to compare

Changelog

  • #791 fix: do not reuse same instance for recipient by @byenilmez
  • #787 support for file_name parameter in File.copyto and File.copyto_using_path methods
  • #781: fix for ImportError: cannot import name 'TypedDict' from 'typing' on Python 3.7
  • #764: fix for parent_folder and parent_collection empty when retrieving file using ctx.web.get_file_by_server_relative_url
  • #735 fix for 401 Client Error: Unauthorised for url on site property update

v 2.5.2

04 Nov 19:57
Compare
Choose a tag to compare

Changelog

v 2.5.1

16 Oct 04:58
Compare
Choose a tag to compare

Changelog

  • #757: Conditionally import ParamSpec from typing_extensions by @thaiphv

v 2.5.0

15 Oct 18:06
Compare
Choose a tag to compare

Changelog

  • #740: fix for Folder.copy_to_using_path method
  • #743: introduce black for code formatting and fix flake8 by @kellerza
  • #746 & #747 typing improvements (support for mypy and pyright type checkers) by @kellerza
  • #744: Fix ResourcePath collection by @kellerza
  • #748: File.download_session method fix
  • introduced GraphClient.with_client_secret and GraphClient.with_username_and_password methods to initialize the client, refer below examples

Example: initializes a GraphClient client using user namename and password flow:

from office365.graph_client import GraphClient

client = GraphClient.with_username_and_password(
    "contoso.onmicrosoft.com", client_id, username, password
)

Example: initializes a GraphClient with client secret:

from office365.graph_client import GraphClient
client = GraphClient.with_client_secret("contoso.onmicrosoft.com", client_id, client_secret)

v 2.4.4

03 Sep 17:20
Compare
Choose a tag to compare

Changelog

  • #723: fixes FieldCollection.add_dependent_lookup_field by @pclasen-eb
  • #722: fixes 404 error with Web.get_file_by_server_relative_path method

v 2.4.3

22 Jul 14:44
Compare
Choose a tag to compare

Changelog

  • #682: fixes the bug with loosing event handlers
  • Support for Interactive authentication via ClientContext.with_interactive method introduced
  • #713: support for oauth2 device code auth introduced

Example: demonstrates how to interactively authenticate via ClientContext client

tenant = "contoso.onmicrosoft.com"

ctx = ClientContext(site_url).with_interactive(tenant, client_id)
me = ctx.web.current_user.get().execute_query()
print(me.login_name)

v 2.4.2

01 Jul 19:58
Compare
Choose a tag to compare

Changelog

  • #645: fixed error when file get addressed by path

Enhancements for files and folders addressing in SharePoint v1 API

When addressing a file or folder, in addition to server relative url format /sites/mysite/folder/filename.ext, it is supported to specify url in site or web relative format now: folder/filename.ext, for example:

ctx = ClientContext(site_url).with_credentials(credentials)
file_url = 'Shared Documents/Report.xlsx'
file = ctx.web.get_file_by_server_relative_url(file_url).get().execute_query()

Support for long running actions in Teams API, polling for status method introduced

Use ensure_created method which polls for team status to determine whether it has been created:

client = GraphClient(acquire_token)
new_team = client.teams.create(team_name).ensure_created().execute_query()

v 2.4.1

22 Apr 08:37
Compare
Choose a tag to compare

Changelog

  • #672: Error handling for when response is not present by @akrymskiy
  • #667: add ability to pass b64 formatted string when adding attachments by @padamscrestonecapital
  • #666: fix for resetting ClientResult (return type) between calls when passing to execute_query method by @vgrem
  • #656: upload session query method compatible with memoryfs python library by @brunoabreu0
  • #655: fix for OneDrive example by @GitSumito

v 2.4.0

17 Feb 17:05
Compare
Choose a tag to compare

Changelog

SharePoint API search namespace enhancements

For methods from SharePoint API search namespace those return type contains value pf SimpleDataTable type, cell values getting addressed like this:

for row in results.Table.Rows:
    print(row.Cells["Path"])  # prints cell value for `Path` property 

Here is an complete example

ctx = ClientContext(site_url).with_credentials(user_credentials)
result = ctx.search.query("contentclass:STS_Site").execute_query()
results = result.value.PrimaryQueryResult.RelevantResults
for row in results.Table.Rows:
    print(row.Cells["Path"])  # prints site url