-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi. I am trying to use the module asyncio to asynchronously upload files to my pcloud folder but it always blocks waits for the upload to be terminate before doing the next line
Do you have any idea of what I'm doing wrong ?
from dotenv import load_dotenv
import os
import asyncio
async def call_this(connection,file):
await uploadfile(connection,file)
async def uploadfile(connection,file):
await connection.uploadfile(files = file)
print("done")
load_dotenv()
pcloud_user = os.environ.get("PCLOUD_USER")
pcloud_password = os.environ.get("PCLOUD_PASSWORD")
connection = PyCloud(pcloud_user, pcloud_password)
asyncio.run(call_this(connection,["test.png","test2.png"]))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels