Skip to main content

fs.onedrivefs

Implementation of pyfilesystem2 file system using OneDrive

image codecov PyPI version

Usage

fs.onedrivefs can create a requests_oauthlib.OAuth2Session for you. This way the OAuth2Session is going to refresh the tokens for you.

onedriveFS = OneDriveFS(
  clientId=<your client id>,
  clientSecret=<your client secret>,
  token=<token JSON saved by oauth2lib>,
  SaveToken=<function which saves a new token string after refresh>)

# onedriveFS is now a standard pyfilesystem2 file system

You can handle the tokens outside of the library by passing a niquests.Session. Here is an example of a custom session using MSAL Python

class MSALSession(OAuth2Session):
  def __init__(self, client: msal.ClientApplication):
    super().__init__()
    self.client = client

  def request(self, *args, **kwargs):
    account = self.client.get_accounts()[0]
    self.token = self.client.acquire_token_silent_with_error(
      scopes=["Files.ReadWrite"], account=account
    )

    return super().request(*args, **kwargs)

client = msal.ConfidentialClientApplication(
  client_id=<your client id>,
  client_credential=<your client secret>,
  authority=f"https://login.microsoftonline.com/<your tenant>",
  token_cache=<your token cache>,
)

# Authentication flow to populate the token cache
# YOUR AUTHENTICATION FLOW

session = MSALSession(client=client)
onedriveFS = OneDriveFS(session=session)

# onedriveFS is now a standard pyfilesystem2 file system

Register your app here to get a client ID and secret

Metadata

Release files for fs.onedrivefs 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fs.onedrivefs 3.0.0
File Size Uploaded Provenance Actions
fs_onedrivefs-3.0.0.tar.gz 594.5 kB With provenance Details for fs_onedrivefs-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fs.onedrivefs 3.0.0
File Interpreter ABI Platform Actions
fs_onedrivefs-3.0.0-py3-none-any.whl Python 3 none any Details for fs_onedrivefs-3.0.0-py3-none-any.whl

Total release size: 606.0 kB

Release files / fs_onedrivefs-3.0.0.tar.gz

Download URL fs_onedrivefs-3.0.0.tar.gz
Size 594.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8e094cf4aedd7e9e03605cd9470ff22e3da96efd7feec978eb5f3ec301697992
BLAKE2b-256 checksum
How to use checksums
12e23da717ed6972d3c6a488c569045624882a3fa83f20ffc2c91677b88cec65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / fs_onedrivefs-3.0.0-py3-none-any.whl

Download URL fs_onedrivefs-3.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f28ddd45d617711f4ecd37b5b7d2c95be9b7312bfdd6ef075c3c05901d878f9c
BLAKE2b-256 checksum
How to use checksums
4b910f207e39e2e466fc3df67046081bc46e51d54de3aa34d44781a1f3cc2a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for fs.onedrivefs 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fs_onedrivefs-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page