Skip to content

Instantly share code, notes, and snippets.

@levamik
levamik / paramiko_sftp_large_file_downloading_demo.py
Created September 27, 2020 23:04 — forked from vznncv/paramiko_sftp_large_file_downloading_demo.py
Workaround to download a large file with paramiko from a sftp server
"""
The script contains example of the paramiko usage for large file downloading.
It implements :func:`download` with limited number of concurrent requests to server, whereas
paramiko implementation of the :meth:`paramiko.SFTPClient.getfo` send read requests without
limitations, that can cause problems if large file is being downloaded.
"""
import logging
import os