mirror of
https://github.com/Amsterdam/plugfs-sharepoint.git
synced 2026-10-19 17:38:22 +00:00
A SharePoint adapter for plugfs
- Python 98.3%
- Shell 1%
- Dockerfile 0.7%
Bumps [multidict](https://github.com/aio-libs/multidict) from 6.8.0 to 6.9.1. - [Release notes](https://github.com/aio-libs/multidict/releases) - [Changelog](https://github.com/aio-libs/multidict/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/multidict/compare/v6.8.0...v6.9.1) --- updated-dependencies: - dependency-name: multidict dependency-version: 6.9.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| src/plugfs_sharepoint | ||
| tests | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| compose.yaml | ||
| Containerfile | ||
| LICENSE | ||
| linting.sh | ||
| linting_fix.sh | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
plugfs-sharepoint
SharePoint adapter for plugfs.
Install
uv add plugfs-sharepoint
or:
pip install plugfs-sharepoint
What it does
This package provides a SharePoint adapter for plugfs using Microsoft Graph.
Current status
The filesystem is currently read-only.
Support for write, write_iterator, makedirs, and delete is not implemented yet and will be added when needed.
Usage
from plugfs.filesystem import Filesystem
from plugfs_sharepoint import SharepointAdapter
class TokenFactory:
async def __call__(self) -> str:
return "access-token"
async def build_filesystem() -> Filesystem:
adapter = await SharepointAdapter.create(
TokenFactory(),
"example.sharepoint.com",
"/sites/MySite",
)
return Filesystem(adapter)
Quick smoke test:
async def smoke_test(filesystem: Filesystem) -> None:
items = await filesystem.list("/")
for item in items:
print(item.path)
Contract
site_hostmust be host only, for exampleexample.sharepoint.comsite_pathmust be site path only, for example/sites/MySite- token acquisition stays with caller
- filesystem is currently read-only
write,write_iterator,makedirs, anddeleteare not implemented yet
Notes
The adapter uses Microsoft Graph to resolve the site and default document library drive.