OneDrive / onedrive-sdk-python

OneDrive SDK for Python! https://dev.onedrive.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async uploads are blocking but async downloads are not

KTibow opened this issue · comments

You can get by this by running an async upload on a different thread or using

import asyncio
# Make sure you've authenticated
def download(client, drivename, localname):
    loop = asyncio.get_event_loop()
    loop.run_until_complete(client.item(drive='me', path=drivename).download_async(localname))

download(client, "largefile.whatever", "downloadedfile.whatever")

but this is odd behavior that should probably be fixed.