WalkSFTP
This is project is a class that allows for a glob like sftp download to a temporary file and lets you process the downloaded data using processing_function. The log argument can be used to check if the get and process ran correctly so you can run and not pull files that have already been processed and keeps track of files based on their modified time. This uses threading to separate the glob sftp files and the process function.
Installation
Run the following to install:
pip install walk_sftp
Usage
from walk_sftp import WalkSFTP
def process(f)
try:
# if successfull
return True
except:
# if unsuccessfull
return False
WalkSFTP(
ftp_web_address,
username,
password,
start_date='2020-12-25', # optional
end_date='2020-12-28', # optional
print_out=True, # optional
processing_function=process, # optional
log='/some_path_to_log.p', # optional
)
Development walk_sftp
To install walk_sftp, along with the tools you need to develop and run tests, run the following in your virtualend:
$ pip install -e .[dev]
Metadata
Release files for walk-sftp 0.0.28
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| walk_sftp-0.0.28.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| walk_sftp-0.0.28-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.4 kB
Release files / walk_sftp-0.0.28.tar.gz
| Download URL | walk_sftp-0.0.28.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0c580e1091513f9ef00258c92d50a2e1d5afb834daf10f0e00167561c9c740a
|
|
BLAKE2b-256 checksum How to use checksums |
7c381cee92d2762d0392c39df2b66aa18e68d545704d71f366b2af8a002e9216
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Release files / walk_sftp-0.0.28-py3-none-any.whl
| Download URL | walk_sftp-0.0.28-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
273e4e8b3ea1dc16f640781a96bbd3ae92c2b1f4e6e47f1eca6694aef14dbf73
|
|
BLAKE2b-256 checksum How to use checksums |
79092460bdba12918ae30dfe1173863ae475403131d6f5be2f4cdd2bf9aa37ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|