Hi @Banerjee, Somali,
Per my research, you could Granting access using SharePoint App-Only to connect with sharepoint. You can access sharepoint by accesstoken and call HTTP requests by following code
headers = {
'Authorization': "Bearer " + json_data['access_token'],
'Accept':'application/json',
'Content-Type': 'application/json'
}
url = "https://tenant.sharepoint.com/sites/TestSite/_api/web/lists('list-guid')/subscriptions"
l = requests.post(url, headers=headers, data=data)
Here is a nice article to call http request for you to reference
https://martinnoah.com/sharepoint-rest-api-with-python.html
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.