Skip to main content

SharePoint Utility

The SharePoint Utility is a Python package designed to simplify the process of working with files and folders in SharePoint. It provides a set of utility functions that allow you to connect to SharePoint, read and upload files, and perform various operations on files and folders.

Installation

To install the SharePoint Utility package, use the following pip command in your terminal:

!pip install sharepoint-utils

Usage

The SharePoint Utility package provides several functions for connecting to SharePoint, reading and uploading files, and working with files and folders.

Available Functions

# Functions for establishing a connection, reading files, and uploading files.
from sharepoint_utils import read_file_from_different_library
from sharepoint_utils import read_file_from_default_library
from sharepoint_utils import combine_files_into_dataframe
from sharepoint_utils import copy_files_within_folders
from sharepoint_utils import upload_dataframe_as_csv
from sharepoint_utils import connect_to_sharepoint
from sharepoint_utils import get_folder_url
from sharepoint_utils import get_file_path

Usage Examples

# Establish a connection to SharePoint.
sharepoint_ctx = connect_to_sharepoint('your_username', 'your_password', 'https://your_sharepoint_site_url')

# Combine files into a DataFrame.
folder_path = 'relative/folder/path'
df = combine_files_into_dataframe(sharepoint_ctx, folder_path)

# Upload a DataFrame to a SharePoint folder as a CSV file.
folder_path = '/folder_path/'
upload_dataframe_as_csv(ctx, folder, df, 'your_file_name.csv')

# Retrieve SharePoint folder URLs as a list.
folder_urls = get_folder_url(sharepoint_ctx, document_library_relative_url)
print(folder_urls)

# Retrieve SharePoint file paths as a list.
file_paths = get_file_path(sharepoint_ctx, subfolder_urls_files)
print(file_paths)

# Copy files from one folder to another within the SharePoint site.
copy_files_within_folders(ctx, filepath , files_upload_to_path)

Contributing

Contributions to the SharePoint Utility package are always welcome! If you have any suggestions for improvements or if you encounter any issues while using the package, please feel free to contact me. Your feedback and contributions will help make this package even better and more useful for everyone.

Metadata

Release files for sharepoint-utils 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sharepoint-utils 2.0
File Size Uploaded Provenance Actions
sharepoint_utils-2.0.tar.gz 5.9 kB Without provenance Details for sharepoint_utils-2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sharepoint-utils 2.0
File Interpreter ABI Platform Actions
sharepoint_utils-2.0-py3-none-any.whl Python 3 none any Details for sharepoint_utils-2.0-py3-none-any.whl

Total release size: 13.3 kB

Release files / sharepoint_utils-2.0.tar.gz

Download URL sharepoint_utils-2.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
19d8334148fa0a93e65dfba43257e0363ac3901a7b82bb93c406e587e3bdd6b0
BLAKE2b-256 checksum
How to use checksums
7a801e5008dfee60782c7a5001d67ab633d30eeb7843aa1b269a43f8bc2fcdbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Release files / sharepoint_utils-2.0-py3-none-any.whl

Download URL sharepoint_utils-2.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2944899d69fcf7fca9fdd795044b6f0ce3c3deba2ae360f9d96b875d719a6dc0
BLAKE2b-256 checksum
How to use checksums
30383a25334824f61e86ad40a1eb5f853327404bc7b229b829fd9de24411536b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Security for sharepoint-utils 2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page