skillfed

pyftpdlib

Very fast asynchronous FTP server library

pyftpdlib v2.2.0 592.6K downloads/30d#5,852 on PyPI1,816
License unclear Active released

What it is and what it does

pyftpdlib is a pure-Python library for building FTP servers that handle concurrency asynchronously using event-driven I/O (epoll, kqueue, or select). It implements RFC-959 FTP and supports modern extensions like FTPS encryption, IPv6, Unicode filenames, and the MLSD/MLST commands. The library can run as a standalone command-line server or be embedded in an application via its API, with pluggable authorizers for managing virtual and real users on both Unix and Windows.

The package depends on pyasynchat and pyasyncore, which are maintained backports of Python's deprecated stdlib async modules. It is actively maintained and positioned as a lightweight alternative to traditional FTP daemons like vsftpd or proftpd, trading some raw throughput for better concurrent-client scaling in single-process mode. It is suitable for scenarios where you need to embed FTP capability in a Python application or run a quick file-sharing server without external dependencies.

Use it for:

  • Embed an FTP server directly in a Python application to serve files to remote clients without spawning a separate process.
  • Set up a quick file-sharing server with command-line flags (e.g., `python3 -m pyftpdlib --write`) for ad-hoc file distribution.
  • Build a custom FTP service with virtual users and per-user filesystem restrictions using the DummyAuthorizer or custom authorizer classes.
  • Handle many concurrent FTP clients efficiently in a single process using asynchronous I/O instead of forking or threading.
  • Implement FTPS (FTP over TLS) for encrypted file transfers in environments where traditional FTP is insufficient.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Builds asynchronous FTP servers in Python with RFC-959 compliance, supporting FTPS, IPv6, and concurrent client handling through event-driven I/O.

Yes, if you need to embed FTP capability in a Python application or run a lightweight FTP server. The library is actively maintained, has no known vulnerabilities, and is production-stable. However, install friction is high due to backport dependencies (pyasynchat, pyasyncore), and the license status is unclear—verify the license before use in proprietary contexts. Not recommended if you need a standalone, battle-tested FTP daemon; use vsftpd or proftpd instead.

Install

pyftpdlib on PyPI

pip

pip install pyftpdlib

uv

uv add pyftpdlib

poetry

poetry add pyftpdlib

Installing pyftpdlib

Before you install

High install friction due to two runtime dependencies (pyasynchat, pyasyncore) that are themselves maintained as backports of deprecated stdlib modules. The package itself is actively maintained with recent commits, but the dependency chain adds complexity.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the metadata. Verify the actual license before use in proprietary or restricted-license contexts.

Quickstart

from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer

authorizer = DummyAuthorizer()
authorizer.add_user("user", "12345", "/home/user", perm="elradfmwMT")
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer(("127.0.0.1", 21), handler)
server.serve_forever()

Requires Python 3.6 or later; runtime dependencies pyasynchat and pyasyncore must be installed and available.

Verify before relying

  • Whether pyasynchat and pyasyncore are actively maintained or have known stability issues in current Python versions.
  • Actual license identifier and any restrictions on commercial or proprietary use.
  • Performance characteristics on modern Python versions and whether benchmarks cited are current.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.6)
Install friction high — source build required
Runtime dependencies 2 — pyasynchat, pyasyncore
Maintenance actively maintained — 188 days since the last release
Last repo commit
First released
Downloads 592,649/month — #5,852 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyftpdlib-2.2.0.tar.gz

Keywords: asynchronous, daemon, eventdriven, ftp, ftpd, ftps, nonblocking, python, rfc1123, rfc2228, rfc2428, rfc2640, rfc3659, rfc959, sendfile, server, ssl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet :: File Transfer Protocol (FTP)Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Filesystems

Tags

ftp server library pythonasynchronous ftp daemonftps server implementationpython ftp frameworkconcurrent ftp handlingevent-driven file transferrfc 959 ftp compliance
ftp-serverasync-ionetwork-protocol

More Python Modules packages