pytest-sftpserver
py.test plugin to locally test sftp server connections.
Decision gist · record as of 2026-08-14
Yes, if you need to test SFTP client code and want to avoid external server setup. The low install friction, permissive license, and zero known vulnerabilities make it a straightforward choice. However, note that the package is dormant (last release 2019) and classifiers indicate support only through Python 3.7—verify compatibility with your target Python version before adopting.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with only two runtime dependencies (paramiko and six).
- The package is dormant—last release was 2019-09-16 and last commit 2024-03-20—so maintenance is minimal but the codebase remains archived and functional.
License · maintenance · safety
MIT License (permissive) — MIT License (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
last release 2019-09-16 (2524 days) · last repo commit 2024-03-20 · 39 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,067,149 downloads/mo, #4,411 on PyPI
Alternatives
Verify before relying
pip install pytest-sftpserver
import pytest
from pytest_sftpserver import sftpserver
def test_sftp_fetch(sftpserver):
with sftpserver.serve_content({'a_dir': {'somefile.txt': 'File content'}}):
# Test your SFTP client code here
pass- Whether the package works with Python versions beyond 3.7 (classifiers list only 2.7, 3.5–3.7, but last commit is 2024)
- Whether paramiko and six versions have known compatibility issues with modern Python environments
What it is and what it does
pytest-sftpserver is a pytest plugin that injects an SFTP server fixture into your tests. Rather than serving files from disk, it serves content directly from Python objects—dictionaries representing directory structures and file contents. This lets you test SFTP client code (code that connects to and downloads from SFTP servers) without spinning up a real external server or managing temporary files.
The plugin depends on paramiko for SFTP protocol handling and six for Python 2/3 compatibility. It's designed for unit and integration testing of SFTP client functions. The package has been dormant since 2019 but remains functional; it targets Python 2.7 and 3.5–3.7 according to its classifiers.
Use it for
- Unit test an SFTP client function by mocking server responses with in-memory file structures instead of real files.
- Integration test a data pipeline that fetches files from SFTP without requiring a live SFTP server in CI/CD.
- Test error handling in SFTP client code by simulating missing files or permission issues via the mock server.
- Verify SFTP connection logic and authentication flows in isolation without external infrastructure.
- Test directory traversal and recursive file operations against a controlled mock SFTP environment.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to test SFTP client code and want to avoid external server setup.
The low install friction, permissive license, and zero known vulnerabilities make it a straightforward choice. However, note that the package is dormant (last release 2019) and classifiers indicate support only through Python 3.7—verify compatibility with your target Python version before adopting.
Install
pytest-sftpserver on PyPI
Before you install
Low install friction with only two runtime dependencies (paramiko and six). The package is dormant—last release was 2019-09-16 and last commit 2024-03-20—so maintenance is minimal but the codebase remains archived and functional.
License in practice
MIT License (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install pytest-sftpserver
import pytest
from pytest_sftpserver import sftpserver
def test_sftp_fetch(sftpserver):
with sftpserver.serve_content({'a_dir': {'somefile.txt': 'File content'}}):
# Test your SFTP client code here
pass
Verify before relying
- Whether the package works with Python versions beyond 3.7 (classifiers list only 2.7, 3.5–3.7, but last commit is 2024)
- Whether paramiko and six versions have known compatibility issues with modern Python environments
Package facts
| License | MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesparamikosix |
| Maintenance | Dormant 2,524 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,067,149 / month, #4,411 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Software Development :: Testing |
Evidence: pytest_sftpserver-1.3.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest sftp server fixture”
- pytest-sftpserverA pytest plugin that provides a fixture for testing SFTP client code…
- mock-ssh-serverProvides a Python context manager that runs an in-process SSH server…
- pytest-httpbinProvides a pytest fixture that runs a local httpbin server in a test…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also mocksftp · pytest-localftpserver · sftpserver · pytest-localserver · mock-ssh-server · pytest-stub · pytest-mock · pytest-httpbin · pytest-base-url · pytest-mock-resources