Releases: vgrem/Office365-REST-Python-Client
Releases · vgrem/Office365-REST-Python-Client
v 2.5.4
v 2.5.3
Changelog
- #791 fix: do not reuse same instance for recipient by @byenilmez
- #787 support for
file_name
parameter inFile.copyto
andFile.copyto_using_path
methods - #781: fix for ImportError: cannot import name 'TypedDict' from 'typing' on Python 3.7
- #764: fix for
parent_folder
andparent_collection
empty when retrieving file usingctx.web.get_file_by_server_relative_url
- #735 fix for 401 Client Error: Unauthorised for url on site property update
v 2.5.2
Changelog
- #762: Missing dependency typing_extensions on Python by @chludwig-haufe
- #764: file and folder addresing methods fixes
- #765: CI & Linting improvements and fixes by @kellerza
- #766: fix to share file with password
- #767: fix change token entity type namefix change token entity type name by @benediktziegler
- #768: documentation fixes by @TomPughe
v 2.5.1
v 2.5.0
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
andpyright
type checkers) by @kellerza - #744: Fix ResourcePath collection by @kellerza
- #748:
File.download_session
method fix - introduced
GraphClient.with_client_secret
andGraphClient.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
v 2.4.3
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
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
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 toexecute_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
Changelog
- #641: add bcc and cc support for users.send_mail by @caleb-depotanalytics
- #649: added examples and authentication clarification by @rebeccajhampton
- SharePoint API search namespace enhancements
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