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.

Source Distribution

ftp-proxy-client-0.0.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

ftp_proxy_client-0.0.7-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file ftp-proxy-client-0.0.7.tar.gz.

File metadata

File hashes

Hashes for ftp-proxy-client-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1e0fa31dac620b94d9bf76943f4adc11ba6dff2b097bdde564074887e3e4081a
MD5 76751fbbd590e3151e152b07a23a9535
BLAKE2b-256 1032c2541c31f2c7ee1164f1375b25cb4c558d50e1ef16fa20d818508b966afe

See more details on using hashes here.

File details

Details for the file ftp_proxy_client-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for ftp_proxy_client-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1cacc7fedb0772a2e564af39561ffcef63fb74f2b3fe724188321ae0393337f6
MD5 9cff277f7640985877fd6f022cd6613d
BLAKE2b-256 52e79164e26dbdcd46765516d649961944f3fc2c87bb3fb02b5e2e9be171d98d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page