{"id":46431,"library":"spindlex","title":"Spindlex","description":"A modern, high-performance SSHv2 and SFTP client/server library for Python, supporting async operations, secure key exchange, and file transfers. Current version is 0.7.2, requiring Python 3.9+. Releases are on a monthly cadence.","status":"active","version":"0.7.2","language":"python","source_language":"en","source_url":"https://github.com/stratza/spindlex","tags":["ssh","sftp","client","server"],"install":[{"cmd":"pip install spindlex","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The public API is at the package root; using submodules may break in future versions.","wrong":"from spindlex.client import SSHClient","symbol":"SSHClient","correct":"from spindlex import SSHClient"},{"note":"","wrong":"","symbol":"SFTPClient","correct":"from spindlex import SFTPClient"}],"quickstart":{"code":"import os\nfrom spindlex import SSHClient, SFTPClient\n\nhost = os.environ.get('SSH_HOST', 'localhost')\nport = int(os.environ.get('SSH_PORT', 22))\nusername = os.environ.get('SSH_USER', 'user')\npassword = os.environ.get('SSH_PASS', '')\n\nclient = SSHClient(host, port=port)\nclient.connect(username, password)\n\n# Execute a command\nstdout, stderr, exit_code = client.run('ls -la')\nprint('STDOUT:', stdout)\n\n# File transfer\nsftp = client.sftp()\nsftp.put('local.txt', '/remote/path/remote.txt')\nsftp.get('/remote/path/remote.txt', 'downloaded.txt')\n\nclient.close()","lang":"python","description":"Basic SSH and SFTP operations using environment variables for credentials."},"warnings":[{"fix":"Pass timeout parameter: SSHClient(host, timeout=30)","message":"The default timeout is None (infinite). Always set a timeout to avoid hanging indefinitely.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Use SSHClient(host='hostname', port=22) instead of SSHClient('hostname', 22).","message":"In version 0.7.0, the SSHClient constructor changed from positional to keyword arguments for host and port. Using positional arguments still works in 0.7.2 but may break in a future release.","severity":"breaking","affected_versions":"0.7.0 - 0.7.2"},{"fix":"Use from spindlex import SFTPClient.","message":"The SFTPClient class was moved from spindlex.sftp to spindlex in 0.6.0. Importing from spindlex.sftp still works but is deprecated.","severity":"deprecated","affected_versions":"0.6.0 - 0.7.2"}],"env_vars":null,"search_vec":"'0.7.2':26 '3.9':29 'async':15 'cadenc':35 'client':38 'client/server':10 'current':23 'exchang':19 'file':21 'high':5 'high-perform':4 'key':18 'librari':11 'modern':3 'month':34 'oper':16 'perform':6 'python':13,28 'releas':30 'requir':27 'secur':17 'server':39 'sftp':9,37 'spindlex':1 'ssh':36 'sshv2':7 'support':14 'transfer':22 'version':24","created_at":"2026-06-07T12:59:53.661379+00:00","updated_at":"2026-06-07T12:59:53.661379+00:00","problems":[{"fix":"Upgrade spindlex to >=0.6.0: pip install --upgrade spindlex","cause":"Using an older version (<0.6.0) where SFTP was not integrated into SSHClient.","error":"spindlex.SSHClient` object has no attribute 'sftp'"},{"fix":"Upgrade to 0.7.2: pip install --upgrade spindlex","cause":"Installed version is <0.5.0 where the main classes were in a different location.","error":"ImportError: cannot import name 'SSHClient' from 'spindlex'"},{"fix":"Ensure server is accessible and set timeout: SSHClient(host, timeout=10)","cause":"SSH server not reachable or firewall blocking port 22. Also, default timeout is None (infinite) leading to indefinite hang.","error":"TimeoutError: Connection timed out"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/stratza/spindlex","github":"https://github.com/stratza/spindlex","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}