Metadata-Version: 2.1
Name: walk-sftp
Version: 0.0.2
Summary: Download SFTP files using a glob to get all files & also keep a log to keep track of processing
Home-page: https://github.com/chrisebell24/walk_sftp
Author: Christopher Bell
Author-email: Chris.E.Bell24@gmail.com
Maintainer: Christopher Bell
Maintainer-email: Chris.E.Bell24@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: numpy (>=1.16.1)
Requires-Dist: pysftp (>=0.2.9)
Requires-Dist: paramiko (>=2.7.2)
Provides-Extra: dev
Requires-Dist: pytest (>=3.7) ; extra == 'dev'

# 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: 

```python
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:
```bash
$ pip install -e .[dev]
```


