Is there a way to extract a sharepoint calendar? If possible with python. I haven't found something on the internet.
Maybe its possible to do that with a rest API.
Is there a way to extract a sharepoint calendar? If possible with python. I haven't found something on the internet.
Maybe its possible to do that with a rest API.
Yes, you can get calendar items through REST API. SharePoint has rich REST API.
SharePoint calendar it is just list items. You can work with it like with other lists items.
https://<server>/<web>/_api/web/lists/getByTitle('<list_display_name>')/items
To this query you can add any additional params. Like $select to select specific fields, $expand to connect to related lists, $filter to filter items, $orderby to sort.
Here you can see official documentation and examples:
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/determine-sharepoint-rest-service-endpoint-uris
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requests
I don't know how to call Python request to RESTful services. I think you can use python "requests" lib.
Like here:
https://realpython.com/api-integration-in-python/
Making a request to a RESTful API using python