onedrive-sdk-python | https : //dev.onedrive.com | SDK library
kandi X-RAY | onedrive-sdk-python Summary
kandi X-RAY | onedrive-sdk-python Summary
OneDrive SDK for Python!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Download a file
- Poll the async loop
- Send this request
- Return a dict representation of the object
- Append an option to this request
- Return a specific drive item
- Returns an ItemRequest builder
- Append a URL to the request URL
- Authenticate the request
- Refreshes a new access token
- Invite an item to a list of recipients
- View a thumbnail
- Update a share
- Update an item
- Update a thumbnail
- Update a single permission
- Update a tag
- Update a thumbnail set
- Update a subscription
- Update a drive
- Return a default consumer client
- Uploads a file to the server
- Creates a copy request
- Updates a drive
- Update an existing tag
- Adds entity to the entity
onedrive-sdk-python Key Features
onedrive-sdk-python Examples and Code Snippets
Community Discussions
Trending Discussions on onedrive-sdk-python
QUESTION
The author from python-onedrive
python-onedrive warns that his library is achrived and obsoleted by official library from microsoft and refers to its git repo sdk
What perplexes me is that the archived obsoleted library is being maintained while the official repo is dead since 6 years ago. What's going on?
Thanks.
...ANSWER
Answered 2021-Dec-31 at 06:01The python-onedrive
library was depreciated in 2015 in this commit.
The commits from July 2021 are typo fixes, which is why it appears to be actively maintained.
QUESTION
I have a OneDrive for Business user account within a large organization. I'd like to have a daemon service running (Python) that automatically uploads files to this user's OneDrive.
This service will be running in a headless VM, so browser-based authentication (especially if it needs to be done more than once) is very difficult.
What are my options for authenticating this app to allow it to write to the user's OneDrive? I've registered an app and created a client secret for it. I was experimenting with the authorization flow described here, but that SDK is deprecated and no longer supported, so I'd prefer to use Graph if possible.
What are my options for authentication with Python in this scenario, and is any sample code / example available?
...ANSWER
Answered 2021-Sep-11 at 18:54Both delegated and application permissions are supported on MS Graph API: https://docs.microsoft.com/en-us/graph/api/drive-list?view=graph-rest-1.0&tabs=http. Application permissions might not be acceptable for your use case since they would allow access to all users' OneDrives?
Application permissions would definitely be the easiest choice. But you can also implement this scenario using delegated permissions You would need the user to initialize the process by authenticating interactively once. When they do that, store the refresh token in a secret store accessible by the server application. Then it can use the refresh token to get a new refresh token + access token when needed. This approach has some more complexity but does allow you to only give access to this one user's OneDrive for the app.
Also, keep in mind that refresh tokens can expire. The user would need to re-authenticate if that happens. If this process is critical, application permissions can be a really good idea despite the downsides.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install onedrive-sdk-python
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page