Install & Compatibility
Where this runs
tested against v0.3.23 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.220s · 40.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.8s · import 0.192s · 41MB
39MB installed
● package 39MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
spur
✓ import spur
Top-level package. Common mistake: trying to import Spur class directly.
spur.SshShell
✓ from spur import SshShell
✗ import spur.SshShell
SshShell is a class inside spur module.
Minimal example showing local and SSH shell usage.
import spur
shell = spur.LocalShell()
result = shell.run(["echo", "hello"])
print(result.output)
ssh_shell = spur.SshShell(
hostname="localhost",
username="user",
password=os.environ.get('SSH_PASSWORD', ''),
)
with ssh_shell:
result = ssh_shell.run(["echo", "hello"])
print(result.output)
Errors
Common errors & fixes
spur.spur.SshShell() TypeError: __init__() got an unexpected keyword argument 'ssh_key_file'
Parameter is 'private_key_file' not 'ssh_key_file'.
fixUse `private_key_file` instead of `ssh_key_file`.
ModuleNotFoundError: No module named 'spur'
Library not installed.
fixRun `pip install spur`
AttributeError: 'SshShell' object has no attribute 'run'
Trying to use SshShell without opening connection first.
fixCall `shell.open()` or use context manager before running commands.
Upgrade
Version history
0.3.23latest on PyPI · released Mar 11, 2023
Audit
Dependencies
paramikorequiredSSH backend, installed automatically