Skip to main content

个推定制化修改版本 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”.

Release files for gtocclient 0.7.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gtocclient 0.7.29
File Size Uploaded
gtocclient-0.7.29.tar.gz 51.5 kB Details

Release files / gtocclient-0.7.29.tar.gz

Download URL gtocclient-0.7.29.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab1bde02d7093853047b43687e05ea70885d42f747e8730841b4afa1060f8164
BLAKE2b-256 checksum
How to use checksums
c3638100e8680374ae44e0280ee2c028c5fdc0d6f67e179d1deda383ef3951ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.7.29 This release

1 release file

0.7.28

1 release file

0.7.27

1 release file

0.7.26

1 release file

0.7.25

1 release file

0.7.24

1 release file

0.7.23

1 release file

0.7.22

1 release file

0.7.21

1 release file

0.7.20

1 release file

0.7.19

1 release file

0.7.18

1 release file

0.7.17

1 release file

0.7.16

1 release file

0.7.15

1 release file

0.7.14

1 release file

0.7.13

1 release file

0.7.12

1 release file

0.7.11

1 release file

0.7.10

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

3 release files

0.5.0

2 release files

0.4

2 release files

0.3

2 release files

0.2

3 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page