mocksftp
Mock SFTP server for testing purposes
What it is and what it does
mocksftp is a testing utility that spins up an in-process SFTP server for testing SFTP client code. It provides fixtures that let you write tests interacting with a real SFTP protocol implementation without needing a separate server process. The server runs in the same process as your test, making it fast and easy to set up and tear down.
The package depends on paramiko for SFTP protocol handling. It was forked from mock-ssh-server but stripped down to focus solely on SFTP. The project is no longer maintained; the last release was 2018-03-21. It works well for straightforward SFTP testing scenarios, but you should verify that it handles your specific use cases and plays nicely with your current Python and dependency versions.
Use it for:
- Test SFTP upload and download operations without spinning up a real server.
- Verify SFTP directory listing and file operations in unit tests.
- Validate error handling in SFTP client code by simulating server-side file states.
- Run SFTP tests in CI/CD pipelines without external server dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides an in-process SFTP server for testing SFTP client code, with fixtures for easy integration into test suites.
Yes, if your SFTP testing needs are straightforward and you can verify the package works with your Python version and current paramiko release. The low install friction and permissive license make it reasonable for test fixtures. However, the abandoned status (no updates since 2018-03-21) means you should test compatibility first and be prepared to maintain a fork if critical issues arise.
Install
mocksftp on PyPI
pip
pip install mocksftpuv
uv add mocksftppoetry
poetry add mocksftpInstalling mocksftp
Before you install
Low install friction with a single runtime dependency (paramiko). However, the project is abandoned—last release was 2018-03-21 with no commits since then. Use only if the frozen feature set meets your needs.
License in practice
MIT license is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install mocksftp
from contextlib import closing
def test_sftp(sftp_server, sftp_client):
sftp = sftp_client.open_sftp()
assert sftp.listdir('.') == []
Requires paramiko as a runtime dependency; test framework integration requires compatible test harness.
Verify before relying
- Whether the package works with modern Python versions (requires_python is unspecified).
- Compatibility with recent versions of paramiko and whether breaking changes have occurred since 2018.
- Whether the frozen codebase handles edge cases or security concerns in SFTP that have emerged since abandonment.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — paramiko |
| Maintenance | abandoned — 3,068 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,647/month — #13,909 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mocksftp-1.0.1-py2.py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-sftpserverA pytest plugin that provides a fixture for…
permissive · top 5,000 on PyPI
mock-ssh-serverProvides a Python context manager that runs an…
permissive · top 15,000 on PyPI
sftpserverProvides a simple single-threaded SFTP server…
permissive · top 15,000 on PyPI
sshfsProvides an fsspec-compatible filesystem…
permissive · top 5,000 on PyPI
pytest-mock-resourcesProvides pytest fixtures that spin up real…
permissive · top 15,000 on PyPI
pysftppysftp provides a high-level Python interface…
permissive · top 5,000 on PyPI
pytest-httpbinProvides a pytest fixture that runs a local…
permissive · top 15,000 on PyPI
sftprettyA Python3 wrapper around paramiko that…
permissive · top 15,000 on PyPI
grpcio-testingProvides testing utilities and fixtures for…
permissive · top 15,000 on PyPI