Skip to main content

Download files from sharepoint site using client id , client secret and tenant id via Azure Active Directory.

Project description

This package helps to download files from sharepoint site using client id , client secret and tenant id via Azure Active Directory.

  • First You need to register an App on Azure Active Directory and get tenant id , client id and client secret.

  • Also you need sharepoint site domain name and site url.

Code Eg:

import sharejeeni

    client_id = "3b724c43-7f32-4d6d-861f-xxxx"
    client_secret = "5yB8Q~xxxxxxxxxxxxxxx"
    tenant_id = 'b71957ca-e23b-4df6-b963-xxxxxx'
    
    sharepoint_url =  "https://xxxx.sharepoint.com"
    Site_name = 'TrialSite' # sharepoint site name
    domain = 'xxxx.sharepoint.com'

    folder = 'Trial_Folder' #Folder name
    subfolder = 'SubTrial_Folder' #Subfolder name
    file = "subfile.csv" #File name
    save_as = 'savedfile.csv' 


token = sharejeeni.request_token(tenant_id,client_secret,client_id)

site = sharejeeni.get_site(token,Site_name,domain)

sharejeeni.Get().file(file,token,site,save_as)

for file inside folder

sharejeeni.Get().folder(folder).file(file,token,site,save_as)

for file in subfolders

sharejeeni.Get().folder(folder).subfolder(subfolder).file(file,token,site,save_as)

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

sharejeeni-1.0.3.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file sharejeeni-1.0.3.tar.gz.

File metadata

  • Download URL: sharejeeni-1.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for sharejeeni-1.0.3.tar.gz
Algorithm Hash digest
SHA256 678620e98b00513612511062fb2b5effb98ba98ec61e12387b8e748ffeb09cbb
MD5 fb52c089c33f52490362dfe5a8e55c73
BLAKE2b-256 db6d6687d042f87ad9267f48a016bbb8f31ea88480622f53f44d8eafa722d552

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