Skip to main content

Getui Custom-Developed Python client library for ownCloud

Project description

个推定制化修改版本 Owncloud SDK,提供客户方进行数据文件交互使用。

Features

Supports connecting to ownCloud 8.2, 9.0, 9.1 and newer.

General information

  • retrieve information about ownCloud instance (e.g. version, host, URL, etc.)

Accessing files

  • basic file operations like getting a directory listing, file upload/download, directory creation, etc

  • read/write file contents from strings

  • upload with chunking and mtime keeping

  • upload whole directories

  • directory download as zip

  • access files from public links

  • upload files to files drop link target

Sharing (OCS Share API)

  • share a file/directory via public link

  • share a file/directory with another user or group

  • unshare a file/directory

  • check if a file/directory is already shared

  • get information about a shared resource

  • update properties of a known share

Apps (OCS Provisioning API)

  • enable/disable apps

  • retrieve list of enabled apps

Users (OCS Provisioning API)

  • create/delete users

  • create/delete groups

  • add/remove user from groups

App data

  • store app data as key/values using the privatedata OCS API

Requirements

  • Python >= 2.7 or Python >= 3.5

  • requests module (for making HTTP requests)

Installation

Automatic installation with pip:

$ pip install gtocclient

Usage

Example for uploading a file then sharing with link:

import owncloud

oc = owncloud.Client('http://domain.tld/owncloud')

oc.login('user', 'password')

oc.mkdir('testdir')

oc.put_file('testdir/remotefile.txt', 'localfile.txt')

link_info = oc.share_file_with_link('testdir/remotefile.txt')

print "Here is your link: " + link_info.get_link()

Running the unit tests

To run the unit tests, create a config file called “owncloud/test/config.py”. There is a config file example called “owncloud/test/config.py.sample”. All the information required is in that file. It should point to a running ownCloud instance to test against.

You might also need to install the unittest-data-provider package:

$ pip install unittest-data-provider

Then run the script “runtests.sh”:

$ ./runtests.sh

Building the documentation

To build the documentation, you will need to install Sphinx and docutil. Then run the following commands:

$ sphinx-apidoc -e -f -o docs/source owncloud/ owncloud/test
$ cd docs
$ make html

You can then find the documentation inside of “doc/build/html”.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtocclient-0.5.0.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

gtocclient-0.5.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file gtocclient-0.5.0.tar.gz.

File metadata

  • Download URL: gtocclient-0.5.0.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6

File hashes

Hashes for gtocclient-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4ae009b9d6f22bac11a1aeb462a48f45b31ec820133dbdf3becca94ff0c66b9f
MD5 f8268da1ead3ba9b74f0a2deda54a54f
BLAKE2b-256 f6c233ce9e1a818ca86749a113dbfd60224bc8e11cbf24c3e763fcecc8a089a2

See more details on using hashes here.

File details

Details for the file gtocclient-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: gtocclient-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.6

File hashes

Hashes for gtocclient-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6cf905da396b00d2480080010b6ece3cc7c9d84760dda4d683c9683c32e0a0
MD5 6e4c4c54eab0c7893ddfb65e9500b94d
BLAKE2b-256 c1e9509b8213f1925e1f9bcb9e2a8ae6723fd9c3fcfd512b2a625da7d99f3b15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page