This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A wrapper for simple FTP operations: get, put, list etc.

The goal of this library is to provide a frictionless experience to FTPing files in way similar to Amazon’s s3cmd command line tool. The API should be intuitive with the order of arguments reflecting the transfer direction of bytes.

Transfers are assumed to be binary.

Unrecognized commands fall through to the underlying FTP or FTP_TLS connection object

Supports python 2.6, 2.7, 3.3

Examples

from ftpretty import ftpretty

# Minimal
f = ftpretty(host, user, pass)

# Advanced
# kwargs are passed to underlying FTP or FTP_TLS connection
# secure=True argument switches to an FTP_TLS connection default is False
# passive=False disable passive connection, True is the default
f = ftpretty(host, user, pass, secure=True, passive=False, timeout=10)

# Get a file, save it locally
f.get('someremote/file/on/server.txt', '/tmp/localcopy/server.txt')

or

# Get a file and write to an open file
myfile = open('/tmp/localcopy/server.txt', 'wb')
f.get('someremote/file/on/server.txt', myfile)

or

# Get a file and return contents (in python 3 contents is bytes)
contents = f.get('someremote/file/on/server.txt')

# Put a local file to a remote location
# non-existent subdirectories will be created automatically
f.put('/tmp/localcopy/data.txt', 'someremote/file/on/server.txt')

or

# Put a local file into a remote directory, denoted by trailing slash on remote
f.put('/tmp/localcopy/data.txt', 'someremote/dir/')

or

# Put using an open file desciptor
myfile = open('/tmp/localcopy/data.txt', 'r')
f.put(myfile,  'someremote/file/on/server.txt')

or

# Put using string data (in python 3 contents should be bytes)
f.put(None,  'someremote/file/greeting.txt', contents='blah blah blah')

# Return a list the files in a directory
f.list('someremote/folder')
['a.txt', 'b.txt']

f.list('someremote/folder', extra=True)
[{'date': 'Feb 11',
  'datetime': datetime.datetime(2014, 2, 11, 2, 3),
  'directory': 'd',
  'group': '1006',
  'items': '3',
  'name': 'a.txt',
  'owner': '1005',
  'perms': 'rwxr-xr-x',
  'size': '4096',
  'time': '02:03',
  'year': '2014'},
 {'date': 'Feb 11',
  'datetime': datetime.datetime(2014, 2, 11, 2, 35),
  'directory': 'd',
  'group': '1006',
  'items': '3',
  'name': 'b.txt',
  'owner': '1005',
  'perms': 'rwxr-xr-x',
  'size': '4096',
  'time': '02:35',
  'year': '2014'}]

# Change to remote directory
f.cd('someremote/folder')

# Delete a remote file
f.delete('someremote/folder/file.txt')

# Close the connection
f.close()

Changelog for ftpretty

0.2.3 (2015-12-01)

  • rename() added

0.2.2 (2015-07-23)

  • Setup fix

0.2.1 (2015-05-20)

  • Python3 support added

0.2.0 (2014-11-28)

  • Fixed an edge case for list
  • PEP 8 fixes

0.1.9 (2014-06-17)

  • Support for Python 2.6

0.1.8 (2014-04-08)

  • Add ability to filter dotfiles from directory list

0.1.7 (2014-03-03)

  • Add tests

0.1.6 (2014-02-17)

  • Parse file dates in list(extra=True) into datetime objects
  • add dateutil dependency
  • Add tests and mock FTP client
  • Reformat authors file
  • Some more examples
  • Pep8ify

0.1.5 (2014-02-17)

  • Version bump for PyPI

0.1.4 (2014-02-17)

  • History fix

0.1.3 (2014-02-17)

  • Add passive flag

0.1.2 (2014-02-13)

  • Initial release.

Authors

  • Rob Harrigan
  • Chris Cannon
  • Philippe Ombredanne
  • Panos Katseas
  • Niklas Bivald
  • Doug Van Horn
Release History

Release History

0.2.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ftpretty-0.2.3.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Dec 2, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting