Python FTP server library (pyftpdlib)

About

Python FTP server library provides an high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib is actually the most complete RFC959 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=('r', 'w'))
>>> 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:

Tutorial Tutorial containing API reference and example usages.
FAQ Frequently Asked Questions about pyftpdlib.
Roadmap A "roadmap" describing current and future project's changes.
Release Notes Release notes of the current pyftpdlib release.
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).

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 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 and new testers and coders joining the team are well accepted.
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 of yours, please update pyftpdlib's Adoptions List.

Thank you.