A modern, high-performance SSHv2 and SFTP client/server library
Project description
⚡ Overview
SpindleX is a modern SSH protocol implementation for Python 3.9+. It is designed for high-performance automation and secure file transfers, providing a clean alternative to legacy SSH libraries.
[!WARNING] Beta software. The 0.6.x line is stabilising the core protocol, transport, and SFTP layers. Review meta/SECURITY.md before deploying in production-facing workflows, pin exact versions, and audit your host key policy.
🔥 Key Features
- 🚀 High Performance: Optimized internal buffering (32KB chunks) for high-throughput SFTP and command execution.
- 🔄 Native Async: First-class
asynciosupport viaAsyncSSHClientandAsyncSFTPClient. - 🛡️ Security: Prioritizes modern primitives (Ed25519, AES-256-CTR) and disables legacy/weak ciphers.
- 🔗 Advanced Tunneling: Support for ProxyJump (bastion hosts) and TCP port forwarding.
- 📂 Recursive SFTP: Native support for recursive directory uploads and downloads.
- 🏷️ Fully Typed: Comprehensive type hints for IDE integration and static analysis.
💎 Why SpindleX?
- 💼 Business Friendly: MIT Licensed. Permissive use for commercial and proprietary projects.
- 📖 Maintainable Code: Modular architecture designed for clarity and easier security auditing.
- 🛠️ Modern API: Clean, intuitive interface with consistent error handling and minimal dependencies.
- 🧊 Focused Scope: No support for insecure legacy protocols, resulting in a leaner and more secure codebase.
🛠️ Tech Stack
Core Logic
Protocol
Concurrency
🚀 Quick Start
Installation
# Using pip
pip install spindlex
# Using uv
uv pip install spindlex
💻 Usage Preview
Synchronous Example
from spindlex import SSHClient
with SSHClient() as client:
client.get_host_keys().load()
client.connect('example.com', username='admin')
stdin, stdout, stderr = client.exec_command('uptime')
print(f"Server Status: {stdout.read().decode().strip()}")
Asynchronous Example
import asyncio
from spindlex import AsyncSSHClient
async def main():
async with AsyncSSHClient() as client:
await client.connect('example.com', username='admin')
stdin, stdout, stderr = await client.exec_command('df -h')
print(await stdout.read())
asyncio.run(main())
📊 Performance Benchmarks
SpindleX is optimized for high-throughput environments, significantly reducing protocol overhead compared to standard implementations.
| Operation | SpindleX | Legacy Libraries | Improvement |
|---|---|---|---|
| Handshake | 0.32s | 0.85s | ~2.6x |
| Bulk SFTP | 45 MB/s | 18 MB/s | ~2.5x |
| Overhead | Low | High | 🔥 |
[!TIP] Run the benchmark suite on your own hardware:
python scripts/benchmark_compare.py
🛡️ Security
- Verification Enforced: Host key verification is mandatory by default.
- Log Sanitization: Credentials and sensitive data are automatically filtered from logs.
- Modern Defaults: Ed25519 and ECDSA preferred for key exchange.
- Full Policy: See meta/SECURITY.md for vulnerability reporting and security standards.
🤝 Contributing
Contributions are welcome. See meta/CONTRIBUTING.md for guidelines.
Distributed under the MIT License. See LICENSE for more information.
SpindleX Project © 2026 Stratza Labs
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.11.tar.gz.
File metadata
- Download URL: spindlex-0.6.11.tar.gz
- Upload date:
- Size: 144.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9012357266ddef80e6114532f16793e555f9becc2013be625efb187b79a664a
|
|
| MD5 |
03c729c2a8d1ff7d0b713839837046d7
|
|
| BLAKE2b-256 |
e666feecd69bd30817fc58c06a78efaf526aa5bd3d0c8197830b67f0b266c410
|
Provenance
The following attestation bundles were made for spindlex-0.6.11.tar.gz:
Publisher:
release.yml on stratza/spindlex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spindlex-0.6.11.tar.gz -
Subject digest:
c9012357266ddef80e6114532f16793e555f9becc2013be625efb187b79a664a - Sigstore transparency entry: 1525469847
- Sigstore integration time:
-
Permalink:
stratza/spindlex@a0e0e4afe8580167cbecc7447c70ea229faf18fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stratza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a0e0e4afe8580167cbecc7447c70ea229faf18fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file spindlex-0.6.11-py3-none-any.whl.
File metadata
- Download URL: spindlex-0.6.11-py3-none-any.whl
- Upload date:
- Size: 158.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17ed6472884dd06cfe904eddc78daea7979c1c91051ab87686d70ed96254eeaf
|
|
| MD5 |
4c123b5a84e7c37ce0b15aef4cc9d1fa
|
|
| BLAKE2b-256 |
9eaf28f61d6a4ef8977e613ab36b2b31eb91c4629ef9a3e96eda43de7daf7fc1
|
Provenance
The following attestation bundles were made for spindlex-0.6.11-py3-none-any.whl:
Publisher:
release.yml on stratza/spindlex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spindlex-0.6.11-py3-none-any.whl -
Subject digest:
17ed6472884dd06cfe904eddc78daea7979c1c91051ab87686d70ed96254eeaf - Sigstore transparency entry: 1525469910
- Sigstore integration time:
-
Permalink:
stratza/spindlex@a0e0e4afe8580167cbecc7447c70ea229faf18fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stratza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a0e0e4afe8580167cbecc7447c70ea229faf18fb -
Trigger Event:
push
-
Statement type: