Forum Archive

WebDAV Client lib

elkrause

Hi! Could you recommend a WebDAV client lib? I would like to write files to my NextCloud private cloud.

I have tried EasyWebDav but it‘s only for Python 2. WebDavClient3 needs the lib „lxml“ that won‘t install with Pythonista.

elkrause

I found a lib for ownCloud that works also with my NextCloud installation and Python 3 —> pyocclient

ihf

Were you able to get this working? I have the same requirement (read/write Nextcloud files using WebDAV). I tried installing pyocclient but did not get far. In Stash:
```
git clone https://github.com/owncloud/pyocclient.git
Opening: https://github.com/jsbain/gittle/archive/master.zip

Save as: /private/var/mobile/Containers/Data/Application/9AC95861-856F-4573-AFF0-387BDD5EAF02/tmp//gittle.zip (??? bytes)
27.7KiB
mv: Error: Destination path '/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/lib/gittle/gittle' already exists
Opening: https://github.com/FriendCode/funky/archive/master.zip

Save as: /private/var/mobile/Containers/Data/Application/9AC95861-856F-4573-AFF0-387BDD5EAF02/tmp//funky.zip (??? bytes)
8.3KiB
mv: Error: Destination path '/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/lib/funky/funky' already exists
stash: : No module named 'urlparse' ```

ccc

Is that error related to any of these? https://github.com/ywangd/stash/search?q=funky&type=Issues

mikael

@ihf, looks like pyocclient is a single-file package with all dependencies provided by Pythonista, so you should be able to install (copy) it manually from github:

  • Open stash
  • cd site-packages
  • mkdir owncloud
  • cd owncloud
  • wget https://raw.githubusercontent.com/owncloud/pyocclient/master/owncloud/__init__.py
  • wget https://raw.githubusercontent.com/owncloud/pyocclient/master/owncloud/owncloud.py

Then import owncloud and follow the docs, which I have not looked at.

ihf

That works great. Thanks!