Upload and Download Files from Nextcloud by Python script

Hi everyone.
I am going to upload and download some Images from my computer into my NextCloud.
I am using Python but unfortunately I couldn’t find any library which can do that fine.
Can anybody help me ?

There is one from ownCloud you can use for Nextcloud as well:

However it doesn’t throw an error if you use wrong credentials: https://github.com/nextcloud/server/issues/13561
And a new features like with tagging and others could be added.