GithubHelp home page GithubHelp logo

pydio-sdk-python's Introduction

pydio-sdk-python

Python SDK to communicate with Pydio backend.

We currently use the Python 2 branch.

(The master branch in Python 3 should be up to date and documented. The Python 2 branch exists for backward compatibility and transition.)

Installation instructions

git submodule add [email protected]:pydio/pydio-sdk-python pydiosdkpython
git submodule init
git submodule update
virtualenv pydio --python=python3
source pydio/bin/activate
pip -r pydio/requirements.txt

Example usage

List files in My Files

from pydiosdkpython.remote import PydioSdk

sdk = PydioSdk("http(s)://localhost/pydio", "my-files", "/", '', auth=('user', 'password'))
print(sdk.list())

pydio-sdk-python's People

Contributors

cdujeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pydio-sdk-python's Issues

Upload error: file is partial (410)

Hello,

I'm trying to upload a file to pydio with pydio-sdk-python but no matter the size of the file, it always return: Upload error: file is partial (410). I'm using python3.

My simple code:

sdk = PydioSdk(url="https://by.hrcls.tv",
               ws_id="my-files",
               remote_folder="/",
               user_id='',
               auth=('login', 'password'),
               skip_ssl_verify=True)

f = "/Volumes/data/Users/predat/dl.pdf"

sdk.upload(local=f,
           local_stat={'size': os.stat(f).st_size},
           path=os.path.basename(f),
           callback_dict=None)

the error:

Traceback (most recent call last):
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 727, in upload
    self.perform_request(url=url, type='post', data=data, files=files, with_progress=callback_dict)
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 331, in perform_request
    stream=stream, with_progress=with_progress)
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 277, in perform_with_tokens
    max_size=self.upload_max_size)
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 1054, in upload_file_with_progress
    parse_upload_rep(resp)
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 999, in parse_upload_rep
    raise PydioSdkDefaultException(str(http_response.text))
pydiosdkpython.exceptions.PydioSdkDefaultException: Upload error: file is partial (410)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 33, in <module>
    callback_dict=None)
  File "/Volumes/data/Users/predat/Documents/dev/python/pydio/pydiosdkpython/remote.py", line 729, in upload
    if e.message == '507':
AttributeError: 'PydioSdkDefaultException' object has no attribute 'message'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.