Sharepoint API
Install
pip install sharepoint-api
Setup Config
Create config.yaml
TENANT_NAME: ""
SITE_NAME: ""
CLIENT_ID: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx"
CLIENT_SECRET: ""
LIBRARY_NAME: "Shared Documents"
Currently I am using Sharepoint "Shared Documents" area
If you needs to change -> Change in YAML file
LIBRARY_NAME: ""
Examples:
from sharepoint_api import SharePoint
sharepoint = SharePoint(config_path='config.yaml')
sp_path = "Myfiles/temp"
folder = sharepoint.get_folder(sp_path)
print(f"Folder: {folder}")
files, subfolders = sharepoint.list_folder_items()
print(files, subfolders)
# Download file
sharepoint.download_file(sp_path="Myfiles/temp/exam_result_v1.csv", local_file_path="/home/user/myfiles")
# Delete File
sharepoint.delete_file("MyFiles/models/yolo11n-obb.pt")
# Get file metadata
file_metadata = sharepoint.get_file_metadata("MyFiles/videos/sample_video.mp4")
print(f"File Metadata: {file_metadata.properties}")
# Upload File
sharepoint.upload_file("sample/exam_result_v1.csv", "Myfiles/temp/upload_test")
# Download Folder
sharepoint.download_folder(sp_path="Myfiles/temp/test1", local_file_path="/home/user/myfiles/sample")
# Create Folder
sharepoint.create_folder("Myfiles/temp/test2")
# Delete Folder
sharepoint.delete_folder("Myfiles/temp/test2")
# Upload Folder
sharepoint.upload_folder("sample/test", "Myfiles/gallery")
Metadata
Release files for sharepoint-api 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sharepoint_api-1.4.1.tar.gz | 5.0 kB | Without provenance | Details for sharepoint_api-1.4.1.tar.gz |
Security for sharepoint-api 1.4.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.