{"id":24641,"library":"spur","title":"spur","description":"A Python library for running commands and manipulating files locally or over SSH using the same interface. Current version: 0.3.23. Release cadence: sporadic, last release 2020.","status":"maintenance","version":"0.3.23","language":"python","source_language":"en","source_url":"https://github.com/mwilliamson/spur.py","tags":["ssh","remote-execution","command-runner"],"install":[{"cmd":"pip install spur","lang":"bash","label":"Install spur"}],"dependencies":[{"reason":"SSH backend, installed automatically","package":"paramiko","optional":false}],"imports":[{"note":"Top-level package. Common mistake: trying to import Spur class directly.","symbol":"spur","correct":"import spur"},{"note":"SshShell is a class inside spur module.","wrong":"import spur.SshShell","symbol":"spur.SshShell","correct":"from spur import SshShell"}],"quickstart":{"code":"import spur\n\nshell = spur.LocalShell()\nresult = shell.run([\"echo\", \"hello\"])\nprint(result.output)\n\nssh_shell = spur.SshShell(\n    hostname=\"localhost\",\n    username=\"user\",\n    password=os.environ.get('SSH_PASSWORD', ''),\n)\nwith ssh_shell:\n    result = ssh_shell.run([\"echo\", \"hello\"])\n    print(result.output)","lang":"python","description":"Minimal example showing local and SSH shell usage."},"warnings":[{"fix":"Explicitly pass store_pid=True when running commands if needed.","message":"spur 0.3.17 changed the default value of `store_pid` from True to False. If you rely on storing PID files, set store_pid=True.","severity":"breaking","affected_versions":">=0.3.17"},{"fix":"Use `with SshShell(...) as shell:` or call `shell.open()` and `shell.close()`.","message":"spur.SshShell.connect() is deprecated; use context manager (with statement) or open/close manually.","severity":"deprecated","affected_versions":"all"},{"fix":"Always use `with SshShell(...) as shell:` pattern.","message":"SshShell does not automatically close the connection; you must call close() or use a context manager. Forgetting to close can leave stale SSH connections.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `private_key_file` instead of `ssh_key_file`.","cause":"Parameter is 'private_key_file' not 'ssh_key_file'.","error":"spur.spur.SshShell() TypeError: __init__() got an unexpected keyword argument 'ssh_key_file'"},{"fix":"Run `pip install spur`","cause":"Library not installed.","error":"ModuleNotFoundError: No module named 'spur'"},{"fix":"Call `shell.open()` or use context manager before running commands.","cause":"Trying to use SshShell without opening connection first.","error":"AttributeError: 'SshShell' object has no attribute 'run'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}