Registry / http-networking / spur
library0.3.23pypypi✓ verified 84d ago

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.

pip install spur
INSTALL
IMPORT
SIG · SPUR
S
spur
http-networkingpythonv0.3.23
Install
2.8s avg
Import
206ms
Disk
39MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.220s · 40.9MB
glibc
py 3.103.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)
Debug
Known issues
breakingspur 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.
fix
Explicitly pass store_pid=True when running commands if needed.
affects: >=0.3.17
deprecatedspur.SshShell.connect() is deprecated; use context manager (with statement) or open/close manually.
fix
Use `with SshShell(...) as shell:` or call `shell.open()` and `shell.close()`.
affects: all
gotchaSshShell does not automatically close the connection; you must call close() or use a context manager. Forgetting to close can leave stale SSH connections.
fix
Always use `with SshShell(...) as shell:` pattern.
affects: all
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'.
fix
Use `private_key_file` instead of `ssh_key_file`.
ModuleNotFoundError: No module named 'spur'
Library not installed.
fix
Run `pip install spur`
AttributeError: 'SshShell' object has no attribute 'run'
Trying to use SshShell without opening connection first.
fix
Call `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
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
spur — pip install spur · libregistry