Python FTP server library (pyftpdlib)

About

Python FTP server library provides a high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib is currently the most complete RFC-959 FTP server implementation available for Python programming language.

Features

Quick start

  >>> from pyftpdlib import ftpserver
  >>> authorizer = ftpserver.DummyAuthorizer()
  >>> authorizer.add_user("user", "12345", "/home/user", perm="elradfmw")
  >>> authorizer.add_anonymous("/home/nobody")
  >>> ftp_handler = ftpserver.FTPHandler
  >>> ftp_handler.authorizer = authorizer
  >>> address = ("127.0.0.1", 21)
  >>> ftpd = ftpserver.FTPServer(address, ftp_handler)
  >>> ftpd.serve_forever()
  Serving FTP on 127.0.0.1:21
  []127.0.0.1:2503 connected.
  127.0.0.1:2503 ==> 220 Ready.
  127.0.0.1:2503 <== USER anonymous
  127.0.0.1:2503 ==> 331 Username ok, send password.
  127.0.0.1:2503 <== PASS ******
  127.0.0.1:2503 ==> 230 Login successful.
  [anonymous]@127.0.0.1:2503 User anonymous logged in.
  127.0.0.1:2503 <== TYPE A
  127.0.0.1:2503 ==> 200 Type set to: ASCII.
  127.0.0.1:2503 <== PASV  127.0.0.1:2503 ==>
  227 Entering passive mode (127,0,0,1,9,201).
  127.0.0.1:2503 <== LIST
  127.0.0.1:2503 ==> 150 File status okay. About to open data connection.
  [anonymous]@127.0.0.1:2503 OK LIST "/". Transfer starting.
  127.0.0.1:2503 ==> 226 Transfer complete.
  [anonymous]@127.0.0.1:2503 Transfer complete. 706 bytes transmitted.
  127.0.0.1:2503 <== QUIT
  127.0.0.1:2503 ==> 221 Goodbye.  [anonymous]@127.0.0.1:2503 Disconnected.

Documentation and related links

Primary documentation and related links include the following:

Type Description
Tutorial Tutorial containing API reference and example usages.
FAQ Frequently Asked Questions about pyftpdlib.
Install Instructions for installing pyftpdlib (for those really new to Python).
RFCs Compliance A paper showing pyftpdlib compliance against FTP protocol standard RFCs.
Release Notes Release notes of the current pyftpdlib release.
Roadmap A "roadmap" describing current and future project's changes.
Adoptions List A list of softwares and systems using pyftpdlib.
FreeBSD port Porting of pyftpdlib on FreeBSD system (note: it is a separate project maintained by a different team).

Timeline

Contribute

If you want to help or just give us suggestions about the project and other related things, subscribe to the discussion mailing list. If you want to talk with project team members about pyftpdlib and other related things, feel free to contact us at the following addresses:

Name Country E-mail Description
Giampaolo Rodola' Italy g.rodola at gmail dot com Original pyftpdlib author and main maintainer.
Jay Loden New Jersey (USA) jloden at gmail dot com OS X and Linux platform development/testing.
Li-Wen Hsu Taiwan lwhsu at freebsd dot org FreeBSD port maintainer.

Feedbacks and suggestions are greatly appreciated as well as new testers and coders willing to join the development.

For any bug report, patch proposal or feature request, add an entry into the Issue Tracker.

In case you're using pyftpdlib into a software or website of yours, please update the pyftpdlib Adoptions List by adding a comment in the Wiki.

Thank you.