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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09684b3450b2dc5247de44d8088ddcc945affdea2044996cb7cd23795db7dbcb
|
|
| MD5 |
7b69eeff60c4d27d5afdbd482aa9d603
|
|
| BLAKE2b-256 |
d896d06bc6523e9802190aa3e7595fde6f1a347b2eef374d135f5806811a93ef
|
Provenance
The following attestation bundles were made for aisquare_pipe_onedrive-0.1.0.tar.gz:
Publisher:
publish.yml on AISquare-Studio/pipe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aisquare_pipe_onedrive-0.1.0.tar.gz -
Subject digest:
09684b3450b2dc5247de44d8088ddcc945affdea2044996cb7cd23795db7dbcb - Sigstore transparency entry: 1879150387
- Sigstore integration time:
-
Permalink:
AISquare-Studio/pipe@0fd3397a575028e7b1163d295735047db3e5de7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AISquare-Studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0fd3397a575028e7b1163d295735047db3e5de7d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file aisquare_pipe_onedrive-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aisquare_pipe_onedrive-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31de9c59b4170b77877a22623641e96c49a4abd8d6c5accaa9689d1ef2cf32bf
|
|
| MD5 |
cb33b3f8d419a7a97b5a6539f8f00fc0
|
|
| BLAKE2b-256 |
278a7a765740ceb025183256a9ff1cde58eabb20b2643e5dbc036a21e14bc67d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aisquare_pipe_onedrive-0.1.0-py3-none-any.whl -
Subject digest:
31de9c59b4170b77877a22623641e96c49a4abd8d6c5accaa9689d1ef2cf32bf - Sigstore transparency entry: 1879150452
- Sigstore integration time:
-
Permalink:
AISquare-Studio/pipe@0fd3397a575028e7b1163d295735047db3e5de7d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AISquare-Studio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0fd3397a575028e7b1163d295735047db3e5de7d -
Trigger Event:
workflow_dispatch
-
Statement type: