Skip to main content

A basic sharepoint wrapper to be used with app-only credentials

Project description

Sharepoint Wrapper

Create Cofiguration

from sharepoint_wrapper import SharePointConfig

config = SharePointConfig(
    tenant="<tenant>",
    tenant_domain="<tenant_domain>",
    client_id="<client_id>",
    client_secret="<client_secret>",
    site="<site_name>",
)

Get Folders

from sharepoint_wrapper import get_folders

folders_at_root = get_folders(config)
# or 
# ensure your path starts with a slash "/"
folders_at_path = get_folders(config, "/my/path") 

Get Files

from sharepoint_wrapper import get_files

files_at_root = get_files(config)
# or 
# ensure your path starts with a slash "/"
files_at_path = get_files(config, "/my/path") 

Get File Content

from sharepoint_wrapper import get_file_content
from io import BytesIO

file_name = "my_file.pdf"

# returns a BytesIO file

file_at_root: BytesIO = get_file_content(config, file_name)
# or 
# ensure your path starts with a slash "/"
file_at_path: BytesIO = get_file_content(config, file_name, "/my/path") 

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

sharepoint_wrapper-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

sharepoint_wrapper-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file sharepoint_wrapper-0.0.1.tar.gz.

File metadata

  • Download URL: sharepoint_wrapper-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for sharepoint_wrapper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 14fcf505934252b8da11e87cfa40d8fc08b2ad13fcfe7990dd8d0bc2d70d4499
MD5 aaa6149d784f39f9afcef40efbb71266
BLAKE2b-256 8b182279bab3c14fe9d11bb32f29fdef93ea7821eabc6c8114d30be1b78760f8

See more details on using hashes here.

File details

Details for the file sharepoint_wrapper-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sharepoint_wrapper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d8414cd5bf5f25499209892d174f250612655733c424fb7ef3dd672cbb1ac24
MD5 45bd45f280e8c3601e1cee446081baae
BLAKE2b-256 f872acb137245c8fa19fe5493037549d9269f78421242f6510a85d50670a0ed3

See more details on using hashes here.

Supported by

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