Python program to interact with the Microsoft SharePoint, specifically the Microsoft Lists.
First, make sure you have Python3.7 or higher installed. Also, make sure you have the Pip of that python version.
So, enter the project folder and type the following commands:
$ cp .env.example .env # create the .env file
$ pip3.7 install SharePlum python-decouple pymongo # install dependencies (use your pip version)
Now, just fill the .env
with your credentials from the SharePoint.
SP_LOGIN=<your-Microsoft-email>
SP_PASSWORD=<your-Microsoft-password>
SP_LINK=<https://abc.sharepoint.com>
SP_SITE=<MySharePointSite> # from https://abc.sharepoint.com/sites/MySharePointSite
SP_LIST=<list-name>
MONGO_CLIENT=<mongo-connection-string>
MONGO_DATABASE=<database-name>
MONGO_COLLECTION=<collection-name>
Then, just run the program:
$ python3.7 pyshare.py # use your python version
Performing A CRUD Operation On A SharePoint List Using Python - Ashirwad Satapathi