Skip to main content

python client for ftp-proxy server

Project description

# ftp-proxy-client ![travis](https://travis-ci.com/uptilab2/ftp-proxy-client.svg?branch=master)
An FTP client for [ftp-proxy](https://github.com/uptilab2/ftp-proxy)

## Current features:
- Test successful connection to FTP server through proxy
- List files and directories
- Download a file

## Installation
`pip install ftp-proxy-client`

## Usage
```
ftp_proxy = FtpProxy(host='foo', port=8080)
ftp_client = ftp_proxy.connect('192.168.0.1', port=8080, login='foobar')

assert ftp_client.ping() is True
files, directories = ftp_client.ls()
assert files and directories

files2, directories = ftp_client.ls(recursive=True)
assert len(files2) > len(files)

files3, directories = ftp_client.ls(recursive=True, extension='.txt')
assert not directories
assert files3[0].endswith('.txt')

fp = ftp_client.download(path='/foo.txt')
with open('/tmp/foo.txt', 'wb') as ff:
ff.write(fp.read())
assert fp.tell() > 0
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ftp-proxy-client, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size ftp_proxy_client-0.0.1-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ftp-proxy-client-0.0.1.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page