Skip to main content

A SharePoint file management tool for python programs.

Project description

Simple SharePoint

This package is designed to be a simple code interface to manage files in a SharePoint account.

How to Install

pip install py_simple_sharepoint

How to Use

import os
from py_simple_sharepoint import SharePointClient

sp = SharePointClient(
    tenant_id=os.getenv("SHAREPOINT_CLIENT_TENANT_ID"),
    client_id=os.getenv("SHAREPOINT_AZURE_APPLICATION_ID"),
    cert_path=r"Certificate.cer",
    key_path=r"Certificate.key",
    site_hostname="<sitename>.sharepoint.com",
    site_path='/sites/<location>',
    library_title='Documents'
)

files = sp.get_files(files_path)
sp.create_folder(folder_path='Path/to/New Folder')
sp.upload_file(local_path='file.txt', target_folder='Path/to/Upload Folder')
sp.download_file(file_path='Path/to/file.txt', download_dir='local/path/to/folder')
sp.move_file(file_path='path/to/file.txt', target_folder='other/path/to/file')
sp.rename_file(file_path='path/to/file.txt', new_name='path/to/new file name.txt')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_simple_sharepoint-1.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_simple_sharepoint-1.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file py_simple_sharepoint-1.1.0.tar.gz.

File metadata

File hashes

Hashes for py_simple_sharepoint-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e84519f21ef56ae40e2cbf7b6cd6ffa13290fea825d1f6de69c976a2a3db9f3c
MD5 3195c7dfe3c18cc78f516a69d4b2badf
BLAKE2b-256 ce2dbf39c29fd6d8b3bb3dfb9102d6c4d0bac750bcd9ee2d9260b1fefff951e1

See more details on using hashes here.

File details

Details for the file py_simple_sharepoint-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_simple_sharepoint-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8339b066d0af1c4fc2859f943815c05df26eb99d74bcd20194791a39dfeb43
MD5 ab5b2592cf199008f60b74e37f0ff60b
BLAKE2b-256 776cfe32e3caba342198baf696b4b1ae20b7a45b41f10481f4298af6e8ace79d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page