skillfed

mocksftp

Mock SFTP server for testing purposes

mocksftp v1.0.1 85.6K downloads/30d#13,909 on PyPI2
Permissive license MIT Abandoned released

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 mocksftp

uv

uv add mocksftp

poetry

poetry add mocksftp

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT License

Tags

sftp server testingmock sftp for testssftp client testingin-process sftp serversftp protocol testingtest sftp code
sftp-testing

More Testing packages