Skip to main content

OneDrive connector for aisquare.pipe

Project description

aisquare-pipe-onedrive

OneDrive source and sink connectors for aisquare.pipe. Uses the Microsoft Graph API via requests with azure-identity for authentication.

Install

cd connectors/onedrive
pip install -e ".[dev]"

Authentication

Access Token (quick testing)

config = {"access_token": "eyJ0eXAi..."}

Client Credentials (service accounts)

config = {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "tenant_id": "YOUR_TENANT_ID",
}

Register an app in Azure AD with Files.ReadWrite.All application permission.

Usage

Source — pull files from OneDrive

from aisquare.pipe import Pipeline
from aisquare.pipe.core.envelope import PullParams

source = "onedrive-source"
sink = "mock-sink"

# Basic pull
pipeline = Pipeline(source, sink)
result = pipeline.run(
    source_config=config,
    sink_config={},
)

# With filters
params = PullParams(params={
    "path": "/Documents/Reports",
    "extensions": [".pdf", ".docx"],
    "recursive": True,
    "limit": 50,
    "stream_threshold": 50 * 1024 * 1024,  # stream files > 50MB
})

Sink — push files to OneDrive

from aisquare.pipe.core.envelope import PushParams

params = PushParams(params={
    "target_path": "/Backups/2025",
    "conflict": "replace",   # or "rename" (default), "fail"
})

Connector Details

Property Source Sink
Name onedrive-source onedrive-sink
Types */* (any file) */* (any file)
Streaming Yes (configurable threshold) Yes (auto-chunked)
Max file size 250 GB
Rate limit 600 req/min
Upload threshold 4 MB (simple) / chunked above
Chunk size 10 MB (32 × 320 KiB)

Running Tests

pytest -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aisquare_pipe_onedrive-0.1.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aisquare_pipe_onedrive-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file aisquare_pipe_onedrive-0.1.0.tar.gz.

File metadata

  • Download URL: aisquare_pipe_onedrive-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aisquare_pipe_onedrive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09684b3450b2dc5247de44d8088ddcc945affdea2044996cb7cd23795db7dbcb
MD5 7b69eeff60c4d27d5afdbd482aa9d603
BLAKE2b-256 d896d06bc6523e9802190aa3e7595fde6f1a347b2eef374d135f5806811a93ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for aisquare_pipe_onedrive-0.1.0.tar.gz:

Publisher: publish.yml on AISquare-Studio/pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aisquare_pipe_onedrive-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aisquare_pipe_onedrive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31de9c59b4170b77877a22623641e96c49a4abd8d6c5accaa9689d1ef2cf32bf
MD5 cb33b3f8d419a7a97b5a6539f8f00fc0
BLAKE2b-256 278a7a765740ceb025183256a9ff1cde58eabb20b2643e5dbc036a21e14bc67d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aisquare_pipe_onedrive-0.1.0-py3-none-any.whl:

Publisher: publish.yml on AISquare-Studio/pipe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page