A modern, high-performance SSHv2 and SFTP client/server library
Project description
SpindleX
Modern, pure-Python SSH library for secure automation, recursive SFTP, and minimal-dependency deployments.
Quick Start • Docs • Security • Contributing
SpindleX is a modern SSH protocol implementation engineered for speed, security, and a seamless developer experience. It provides a clean, performant alternative to legacy Python SSH libraries.
✨ Key Features
- 🚀 High Performance: Optimized protocol implementation with internal buffering designed for high-throughput SFTP and command execution.
- 📦 Modern Architecture: Clean, modular codebase built from the ground up for maintainability. Leverages the industry-standard
cryptographylibrary for robust, hardware-accelerated security. - 🔄 Native Async: First-class support for
asynciowithAsyncSSHClientandAsyncSFTPClient. - 🛡️ Secure by Default: Modern algorithms like Ed25519, ECDSA, and AES-256-CTR with HMAC-SHA2 are prioritized. Legacy SHA-1 and weak ciphers are disabled in the default configuration.
- 🏷️ Fully Typed: Comprehensive type hints across the codebase for robust IDE integration and static analysis.
🚀 Quick Start
Installation
# Using pip
pip install spindlex
# Using uv (recommended)
uv pip install spindlex
Basic Usage
Synchronous Example
from spindlex import SSHClient
from spindlex.hostkeys.policy import AutoAddPolicy
with SSHClient() as client:
client.set_missing_host_key_policy(AutoAddPolicy())
client.connect('example.com', username='admin')
stdin, stdout, stderr = client.exec_command('uptime')
print(f"Status: {stdout.read().decode().strip()}")
Asynchronous Example
import asyncio
from spindlex import AsyncSSHClient
async def run():
async with AsyncSSHClient() as client:
await client.connect('example.com', username='admin')
stdin, stdout, stderr = await client.exec_command('uptime')
print(await stdout.read())
asyncio.run(run())
📺 Demos
[!TIP] View Live Execution Results: See the Verified Demo Outputs from the latest run.
See SpindleX in action across various high-performance scenarios:
🏗️ Full Cycle Automation
complex_setup_demo.py: Watch SpindleX generate Ed25519 keys, deploy them via SFTP, and execute privileged sudo commands—all in under 6 seconds.
🚀 Performance & Multi-Tasking
| Command Execution | SFTP Operations |
|---|---|
| Blazing fast command processing | High-throughput recursive transfers |
| Async Concurrency | Benchmark vs Paramiko |
|---|---|
| Native asyncio integration | Up to ~2.6x faster (results vary by environment) |
⚡ Performance
SpindleX is designed for high-throughput, low-latency environments. It utilizes internal read buffering (32KB chunks) and optimized packet handling to reduce system call overhead and improve protocol efficiency. Actual performance gains are environment-dependent.
📊 Benchmark vs Paramiko
In testing, SpindleX has been observed to outperform legacy libraries in connection establishment and bulk SFTP transfers. Results are environment-dependent — run the included benchmark to verify on your setup.
| Library | Connection Time (Avg)* | Overhead |
|---|---|---|
| SpindleX | 0.32s | Low |
| Paramiko | 0.85s | High |
*Results from a sample run. Your numbers will vary based on network, server, and hardware.
[!TIP] Run the included benchmark script to compare performance in your environment:
python demo/benchmark.py
🛡️ Security
- Hardened Defaults: Modern cryptographic primitives are used by default. Legacy algorithms are disabled unless explicitly configured.
- Mandatory Verification: Host key verification is enforced unless explicitly overridden.
- Privacy Aware: Built-in log sanitizers ensure credentials never reach telemetry.
- Vulnerability Reporting: See meta/SECURITY.md.
🤝 Contributing
Contributions are welcome! See meta/CONTRIBUTING.md to get started.
📄 License
SpindleX is released under the MIT License. See LICENSE for the full text.
© 2026 SpindleX Project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spindlex-0.6.3.tar.gz.
File metadata
- Download URL: spindlex-0.6.3.tar.gz
- Upload date:
- Size: 179.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5cf0269aacecda05c6aeeff4ac66d2d981c0adac4e71ef0968423e6fcb22f56
|
|
| MD5 |
e4714c53e00cb79964900c42a11f4c45
|
|
| BLAKE2b-256 |
3278a244ea22cc1215d9ac79fa7f362d8c8580d5ca76531a34d70a5548842fb9
|
Provenance
The following attestation bundles were made for spindlex-0.6.3.tar.gz:
Publisher:
release.yml on Di3Z1E/spindlex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spindlex-0.6.3.tar.gz -
Subject digest:
c5cf0269aacecda05c6aeeff4ac66d2d981c0adac4e71ef0968423e6fcb22f56 - Sigstore transparency entry: 1343415117
- Sigstore integration time:
-
Permalink:
Di3Z1E/spindlex@f3e2d3880c15d2d7f9ce7226b3440bab043761a3 -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/Di3Z1E
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f3e2d3880c15d2d7f9ce7226b3440bab043761a3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spindlex-0.6.3-py3-none-any.whl.
File metadata
- Download URL: spindlex-0.6.3-py3-none-any.whl
- Upload date:
- Size: 147.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
441a359f42a9b8bbc970a6b47d9e5beec618e2f72840c16782b8482cd96bb70a
|
|
| MD5 |
d79c08851b4cbf91bb86d492e071479e
|
|
| BLAKE2b-256 |
4428a5b03a04b09c9921b3fee96bde708060ef7e3ce6a4247e3fe1eda7ad3e98
|
Provenance
The following attestation bundles were made for spindlex-0.6.3-py3-none-any.whl:
Publisher:
release.yml on Di3Z1E/spindlex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spindlex-0.6.3-py3-none-any.whl -
Subject digest:
441a359f42a9b8bbc970a6b47d9e5beec618e2f72840c16782b8482cd96bb70a - Sigstore transparency entry: 1343415121
- Sigstore integration time:
-
Permalink:
Di3Z1E/spindlex@f3e2d3880c15d2d7f9ce7226b3440bab043761a3 -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/Di3Z1E
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f3e2d3880c15d2d7f9ce7226b3440bab043761a3 -
Trigger Event:
release
-
Statement type: