Unofficial python library for making API requests to [email protected]
requests
requests_toolbelt
tqdm
Creates PyMailCloud object or raises an exception if login and password are incorrect, or internet connection is failed.
folder - folder path relative to cloud home
Returns some strange internal mail.ru JSON object containing folder contents.
filename - file path relative to cloud home
Returns full public URL of file (looks like "https://cloud.mail.ru/public/\<id>/<filename>"), or rises an exception in case of error.
weblink - file path relative to cloud home
Deletes public file link by its weblink, which can be full ("http(s)://cloud.mail.ru/public/<id>/<filename>") or short (just "<id>/<filename>")
Rises an exception in case of error.
folder - folder path relative to cloud home
Traverses the given folder and returns a list of its subfolders (including the folder itself)
Rises an exception if the folder is not found
folder - folder path relative to cloud home
Downloads all files inside the folder or nested folders. Currently files are downloaded to the working path of the script respectively to their path inside the cloud.
Rises an exception if the folder is not found
filenamelist - list of files that should be downloaded
Downloads all files inside the list. Currently files are downloaded to the working path of the script respectively to their path inside the cloud.
Rises an exception if a file is not found
filenamelist - list of dicts containing 'filename' and optionally 'path' if file should be uploaded to specific path. Directories will be created automatically
Upload all files inside the list. Files should be passed with the full path inside the system.
Returns the JSON response from the cloud Rises an exception if a file is larger than 2 GB TODO: Check for quota before uploading
filenamelist - list of dicts containing 'filename'.
Delete all files inside the list. Files should be passed with the full path inside the cloud.
Returns the JSON response from the cloud