--- id: pytest-localftpserver version: "1.6.0" license: unclear license_treatment: permissive maintenance: active --- # pytest-localftpserver — A PyTest plugin which provides an FTP fixture for your tests License: permissive · Maintenance: active · Downloads: 74.9K/mo ## What it is and what it does pytest-localftpserver is a pytest plugin that injects ftpserver and ftpserver_TLS fixtures into your test suite, each providing a threaded, in-process FTP server instance. This lets you write tests that exercise FTP client code—uploads, downloads, authentication, directory operations—without needing an external FTP server or network access. The plugin depends on pyftpdlib for the server implementation and PyOpenSSL for TLS support. You configure the server's behavior (username, password, port, home directory, certificate path) via environment variables or pytest configuration files. The fixture scope can be set per-function, per-module, or per-session, making it flexible for different test strategies. Since the server runs in a thread within your test process, it starts and stops with each test or test session, keeping your test environment isolated and reproducible. Use it for: - Test FTP client libraries or custom upload/download code without a live FTP server. - Verify authentication and permission handling in FTP-based workflows. - Test TLS/SSL FTP connections with a local certificate in CI/CD pipelines. - Validate error handling when FTP operations fail (connection refused, auth denied). - Integration test file transfer workflows in isolation from external services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides pytest fixtures for running local FTP and TLS-FTP servers in tests, enabling you to test FTP client functionality without external dependencies. Yes. This is a stable, actively maintained pytest plugin (released 3 days ago, in production since 2016) with no known vulnerabilities, low install friction, and a clear use case: testing FTP client code locally. The MIT license is permissive. Install it if you need to test FTP functionality in your test suite. ## Install pip install pytest-localftpserver uv add pytest-localftpserver poetry add pytest-localftpserver ## Installing pytest-localftpserver Before you install: Low friction install with stable maintenance: released 3 days ago, active repository, and depends only on pyftpdlib, PyOpenSSL, and pytest—all widely used packages. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: # Install pip install pytest-localftpserver # In your test file import pytest def test_ftp_upload(ftpserver): # ftpserver fixture provides a running FTP server # Configure via environment variables: FTP_USER, FTP_PASS, FTP_PORT, FTP_HOME pass Requires pytest to be installed; FTP server configuration is set via environment variables (FTP_USER, FTP_PASS, FTP_PORT, FTP_HOME) or pytest.ini/tox.ini. Verify before relying: - Whether the ftpserver_TLS fixture works reliably with modern TLS versions and certificate formats. - Performance characteristics when running many concurrent FTP connections in tests. ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 74.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest ftp server fixture, ftp testing plugin, local ftp server tests, ftp mock testing, pytest ftp fixture, test ftp client code, ftp integration testing, ftp-testing, pytest-plugin, test-fixtures [View on SkillFed](https://skillfed.io/packages/pytest-localftpserver) · [View on PyPI](https://pypi.org/project/pytest-localftpserver/)