pypi Office365-REST-Python-Client 3.2.0
v3.2.0

3 hours ago

A large release centered on data import/export, large-list reliability, and the SharePoint Migration API.

✨ Highlights

  • Typed CAML query builder — compose ViewXml in Python instead of raw strings: Caml.text("Status").eq("Active"), Caml.lookup("Category").id().in_([2, 3]), binary-nested .and_()/.or_()/.not_(), plus where / order_by / group_by / view_fields.
  • Streaming import driver — ImportResult queues, executes and discards chunks (bounded memory) with checkpoints (resume interrupted runs), live progress, dead-lettering, and keyed skip/upsert so re-runs never duplicate rows.
  • Migration API toolkit — office365.migration.package (manifest/export XML, PackageBuilder, AES-256-CBC staging, SharePointPackageTarget) and SPMT-style MigrationSession / MigrationServerJob with server-side provisioning and progress. Document-library subset.
  • Locked files (HTTP 423) — typed FileLockedException (.lock_owner, .GUIDANCE) and SPFileCheckOutException, opt-in retry with retry_on(FileLockedException), and bypass_shared_lock=True.
  • Large-list fixes — paging for Folder.get_files and List.get_items(page_size=...), List.ensure_indexed() (the real fix for #427), typed SPQueryThrottledException, and a one-time warning at the 5,000-item threshold. See docs/large-lists.md.
  • Locale-independent errors — classification keyed on HRESULT / the embedded .NET type instead of translated text, plus a full SharePoint exception taxonomy (SPFileCheckOutException, SPListDataValidationException, …).
  • Idempotent provisioning — DriveItem.ensure_file(), the shared get_or_create helper, and ensure_*(on_conflict="skip"|"update") across fields, lists and content types.

⚠️ Breaking changes

  • Data-pipeline naming: from_* is now the streaming entry (returns ImportResult); queue_* is the deferred queue-all path. Removed import_* and to_json_file / from_json_file (use export_to(..., format="json") / from_json); FieldCollection.from_dataframe → ensure_from_dataframe.
  • List.from_dataframe() returns an ImportResult driver (was List); progress is keyword-only.
  • MigrationOptions.preserve_timestamps now defaults to False, and requesting fidelity an adapter pair can't honor raises NotImplementedError instead of silently doing nothing.
  • ensure_* helpers now return the ensured entity/entities.

🐛 Notable fixes

  • Custom transport sessions carrying their own auth handler work again (NTLM/SSPI, #1045); on-prem allow_ntlm=True fixed.
  • 49 collection-bound OData methods were removed from 24 item types (e.g. User.remove_by_id).
  • $skip paging no longer collides with a server $skiptoken.
  • Migration packages now emit the manifest files the API fetches; CreateMigrationJobEncrypted sends the key as base64.
  • DataFrame imports no longer drop columns that collide with built-in SharePoint fields (Name → FileLeafRef).

📄 Full changelog: CHANGELOG.md  ·  📦 pip install --upgrade office365-rest-python-client

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

NewReleases is sending notifications on new releases.