Socket
Socket
Sign inDemoInstall

ftp-proxy-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp-proxy-client

python client for ftp-proxy server


Maintainers
1

ftp-proxy-client travis

An FTP client for 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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc