tochev / python3-pcloudapi Goto Github PK
View Code? Open in Web Editor NEWpython3 library for accessing pcloud.com
License: Other
python3 library for accessing pcloud.com
License: Other
========= 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
If I create a connection with use_flag = false, the code raises an exception.
The line of code to fix is:
#utils.py:111
match_hostname(sock.getpeercert(), server)
Adding an if statement resolve the issue. So
...
if use_ssl:
sock = context.wrap_socket(sock, server_hostname=server)
sock.connect(sa)
if use_ssl:
match_hostname(sock.getpeercert(), server)
return sock
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.