{"id":18930038,"url":"https://github.com/labd/python-mocksftp","last_synced_at":"2025-04-15T15:31:14.374Z","repository":{"id":57442585,"uuid":"94647469","full_name":"labd/python-mocksftp","owner":"labd","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-21T16:04:54.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T22:51:11.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-17T20:29:06.000Z","updated_at":"2019-04-03T09:34:00.000Z","dependencies_parsed_at":"2022-09-26T17:21:06.791Z","dependency_job_id":null,"html_url":"https://github.com/labd/python-mocksftp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-mocksftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-mocksftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-mocksftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fpython-mocksftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labd","download_url":"https://codeload.github.com/labd/python-mocksftp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647254,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:36:20.487Z","updated_at":"2025-04-15T15:31:14.036Z","avatar_url":"https://github.com/labd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. start-no-pypi\n\n.. image:: https://travis-ci.org/LabD/python-mocksftp.svg?branch=master\n    :target: https://travis-ci.org/LabD/python-mocksftp\n\n.. image:: http://codecov.io/github/LabD/python-mocksftp/coverage.svg?branch=master\n    :target: http://codecov.io/github/LabD/python-mocksftp?branch=master\n\n.. image:: https://img.shields.io/pypi/v/mocksftp.svg\n    :target: https://pypi.python.org/pypi/mocksftp/\n\n.. end-no-pypi\n\nmocksftp - Easily test your sftp client code \n============================================\n\nIn-process SFTP server for testing your SFTP related client code.\n\n\nUsage example\n=============\n\nFor pytest, use the ``sftp_server`` and ``sftp_client`` fixtures:\n\n.. code-block:: python\n\n    from contextlib import closing\n    import py.path\n\n\n    def test_open_file(sftp_server, sftp_client):\n        # Write directly in the server root.\n        root_path = py.path.local(sftp_server.root)\n        root_path.join('file.txt').write('content')\n\n        # Access the folder via the client\n        sftp = sftp_client.open_sftp()\n        assert sftp.listdir('.') == ['file.txt']\n\n        with closing(sftp.open('file.txt', 'r')) as data:\n            assert data.read() == b'content'\n\n\nHistory\n=======\n\nThis project was started as a fork of https://github.com/carletes/mock-ssh-server\ncreated by Carlos Valiente.\n\nThe SSH related code was removed to focus solely on the SFTP protocol.\n\n\nAlternatives\n============\n\n* https://github.com/ulope/pytest-sftpserver\n* https://github.com/rspivak/sftpserver\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fpython-mocksftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabd%2Fpython-mocksftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fpython-mocksftp/lists"}