A library to upload files to SharePoint.
Project description
Upload to SharePoint
A Python library to upload files to SharePoint.
Installation
You can install this package using pip:
pip install upload_to_sharepoint
Usage
To upload a file to SharePoint, you can use the upload_file_to_sharepoint
function. Here's how to do it:
Example
from upload_to_sharepoint.sharepoint_upload import upload_file_to_sharepoint
# User credentials
username = 'your_username'
password = 'your_password' # Consider using a more secure method for password management
# SharePoint site details
sharepoint_site = 'https://your-sharepoint-site-url'
target_folder_relative_url_base = '/sites/your_site_name/Shared Documents/target_folder'
# Local file to upload
file_name = 'path_to_your_file.txt'
# Upload the file
upload_file_to_sharepoint(username, password, sharepoint_site, target_folder_relative_url_base, file_name)
Parameters
username
: Your SharePoint username.password
: Your SharePoint password.sharepoint_site
: The URL of your SharePoint site (e.g.,https://your-organization.sharepoint.com/sites/your_site_name
).target_folder_relative_url_base
: The relative URL to the target folder in SharePoint (e.g.,/sites/your_site_name/Shared Documents/target_folder
).file_name
: The path to the local file you want to upload.
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
Close
Hashes for upload_to_sharepoint-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a0a5487ef0471f77772d09a4adaef51b77c81044d6f7d7c7ffe3cfd3910baa |
|
MD5 | 2d2e3c93d667bba5e82217461720c6a2 |
|
BLAKE2b-256 | 934a306e5c5cd33f5d03f0c121d428951bd7ea9e871ab482679144cca4c72f8a |
Close
Hashes for upload_to_sharepoint-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a94fb70050013faf43588c8a1b661542a15deef23eda528c897127006bd4176 |
|
MD5 | 2a7b2f2f4805b91d9478ff9cf3437337 |
|
BLAKE2b-256 | ae49f20bcfeac99a869788854b5b66eb8b5c7f99850c1709cf00056473b5372c |