skillfed

sharepy

Simple SharePoint Online authentication for Python

sharepy v2.0.0 811.6K downloads/30d#5,002 on PyPI177
Copyleft license GPLv3 DORMANT released

What it is and what it does

SharePy is a thin wrapper around the Requests library that automates authentication to SharePoint Online and O365 sites. It handles the Microsoft security token flow, manages access cookies, and automatically refreshes digest tokens needed for API modifications. The package exposes a session object with familiar Requests methods (get, post, etc.) so developers can make HTTP calls to the SharePoint REST API without manually managing authentication headers or token lifecycle.

The package is designed for straightforward scripting and automation tasks—connecting to a SharePoint site, fetching lists or libraries, downloading files, and making modifications through the REST API. It supports both standard SharePoint Online and ADFS-enabled sites, and can persist authenticated sessions to disk to avoid re-authenticating on each run.

Use it for:

  • Automate document downloads from SharePoint libraries on a schedule or in response to events.
  • Query SharePoint lists and retrieve data for reporting or data pipeline tasks.
  • Programmatically upload or modify SharePoint content without manual intervention.
  • Build internal tools that need read/write access to O365 SharePoint sites.
  • Integrate SharePoint data into Python data processing or ETL workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Handles authentication to SharePoint Online and constructs authenticated HTTP requests to the SharePoint REST API, extending the Requests library with session management and token refresh.

Yes, if you need to automate SharePoint Online access and can accept dormant maintenance. The package is stable and has no known vulnerabilities, but GPLv3 copyleft and high install friction (source-only) are real constraints. Evaluate whether the lack of updates since 2023 poses a risk for your authentication flow or Microsoft API compatibility before committing.

Install

sharepy on PyPI

pip

pip install sharepy

uv

uv add sharepy

poetry

poetry add sharepy

Installing sharepy

Before you install

High install friction due to source-only distribution (no wheels). Dormant maintenance—last release February 2022, no commits since September 2023—means bug fixes and compatibility updates are unlikely.

License in practice

GPLv3 copyleft license requires any derivative work to be released under the same license; suitable for internal tools and open-source projects, but incompatible with proprietary closed-source software.

Quickstart

import sharepy
s = sharepy.connect("example.sharepoint.com")
r = s.get("https://example.sharepoint.com/_api/web/lists/GetByTitle('Test Library')")

Requires Python 3.6 or later; interactive authentication prompts for username and password unless provided as arguments.

Verify before relying

  • Whether the package works with current Microsoft authentication endpoints and token formats.
  • Compatibility with recent versions of the Requests library it extends.
  • Whether ADFS authentication support remains functional with modern Active Directory configurations.

Package facts

License GPLv3 (copyleft)
Python support supports the current Python release (>=3.6, <4)
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 1,651 days since the last release
Last repo commit
First released
Downloads 811,607/month — #5,002 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sharepy-2.0.0.tar.gz

Keywords: sharepoint, online, authentication

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Programming Language :: Python :: 3Topic :: Internet

Tags

sharepoint online authentication pythonsharepoint rest api cliento365 sharepoint accesssharepoint session managementauthenticated sharepoint requests
sharepointo365-integrationauthentication

More Internet packages