
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
This Python utility enables users to interact with SharePoint sites via Microsoft Graph API, facilitating tasks such as listing, downloading, uploading, moving, and deleting files.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
https://pypi.org/project/sharepoint-graphql/
This Python utility enables users to interact with SharePoint sites via Microsoft Graph API, facilitating tasks such as listing, downloading, uploading, moving, and deleting files. The motivation behind creating this repository stems from the absence of a SharePoint GraphQL interface in the existing Office365 Python library client (Office365-REST-Python-Client) This README provides instructions for setting up and using the utility.
pip install sharepoint-graphql
TENANT_ID
: Your Azure AD tenant ID.CLIENT_ID
: Client ID of your Azure AD application.CLIENT_SECRET
: Client secret of your Azure AD application.SITE_URL
: URL of the SharePoint site you want to interact with.SharePointGraphql
class from sharepoint_graphql.py
into your Python script.SharePointGraphql
class by passing the required parameters: site_url
, tenant_id
, client_id
, and client_secret
.list_files(folder_path)
: List files within a specific folder.download_file_by_relative_path(remote_path, local_path)
: Download a file by its relative path.upload_file_by_relative_path(remote_path, local_path)
: Upload a file by its relative path.move_file(remote_src_path, remote_des_path)
: Move a file from source to destination.delete_file_by_relative_path(remote_path)
: Delete a file by its relative path.from sharepoint_graphql import SharePointGraphql
# Initialize SharePointGraphql instance
sp_graphql = SharePointGraphql(site_url, tenant_id, client_id, client_secret)
# List files in a folder
files = sp_graphql.list_files("/Shared Documents/Subfolder")
# Download a file
sp_graphql.download_file_by_relative_path("/Shared Documents/Folder/file.txt", "local_path/file.txt")
# Upload a file
sp_graphql.upload_file_by_relative_path("/Shared Documents/Folder/file.txt", "local_path/file.txt")
# Move a file
sp_graphql.move_file("/Shared Documents/Folder/file.txt", "/Shared Documents/NewFolder/file.txt")
# Delete a file
sp_graphql.delete_file_by_relative_path("/Shared Documents/Folder/file.txt")
This project is licensed under the MIT License.
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.