-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
48 lines (36 loc) · 1.24 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
=========
PCloudAPI
=========
PCloudAPI is a python3 library for accessing the pcloud.com API.
It supports both the binary and the json protocols.
Homepage: https://github.com/tochev/python3-pcloudapi
Changelog
========
- v0.0.3
- [Security] Do not allow redirects and enforce pcloud domain
- v0.0.2
- Fix connection without SSL (not using SSL is strongly discouraged)
- v0.0.1 - Initial public version
Examples
========
>>> from pcloudapi import PCloudAPI
>>> api = PCloudAPI()
>>> api.login('[email protected]', '1337pass')
'Ec7QkEjFUnzZ7Z8W2YH1qLgxY7gGvTe09AH0i7V3kX'
>>> api.make_request('listfolder', path='/')['metadata']['icon']
'folder'
>>> api.upload('/tmp/quotes.txt', '/test.txt')
For more see examples/
Status
======
This is a working prototype and is highly experimental. Things might change.
Use at your own risk.
The JSON connection is to be considered safer, although on upload it reads the
whole file into memory which can be a problem (this is due to a limitation of
the python requests library).
Installation
============
sudo apt-get install python3 python3-requests python3-setuptools
git clone https://github.com/tochev/python3-pcloudapi
cd pcloudapi
python3 setup.py install