SpindleX¶
Welcome to SpindleX's documentation! SpindleX is a modern, high-performance SSHv2 and SFTP client/server library.
Features¶
High Performance: Adaptive SFTP write chunks up to 255 KB via
limits@openssh.com, pipelined transfers, and zero-copy internal buffering.Modern Security: ChaCha20-Poly1305 (AEAD, preferred), Ed25519, ECDSA, AES-CTR - legacy and weak primitives excluded. See Algorithms.
Lean Design: Minimal dependencies, leveraging the industry-standard
cryptographylibrary.Full SSH & SFTP: Both client and server implementations for SSHv2 and SFTP.
Native Async: First-class support for
asynciowithAsyncSSHClientandAsyncSFTPClient.Well Tested: Robust test suite with focus on protocol correctness and reliability.
Fully Typed: Complete type hints for a better developer experience.
Unified API: Consistent synchronous and asynchronous client interfaces.
Quick Start¶
Install SpindleX:
Basic SSH Client¶
from spindlex import SSHClient
# Default policy is RejectPolicy - load ~/.ssh/known_hosts first.
with SSHClient() as client:
client.get_host_keys().load()
client.connect('example.com', username='user', password='password')
stdin, stdout, stderr = client.exec_command('ls -la')
print(stdout.read().decode())
```python import asyncio from spindlex import AsyncSSHClient
async def run(): async with AsyncSSHClient() as client: await client.connect('example.com', username='user') stdin, stdout, stderr = await client.exec_command('ls -la') print(await stdout.read())
asyncio.run(run())
```
Navigation¶
- Quick Start - Get up and running in minutes.
- User Guide - Deep dive into SpindleX features.
- Cookbook - Real-world recipes for common tasks.
- API Reference - Detailed technical documentation.
- Performance - Benchmarks and optimization tips.
- Security - Our security model and best practices.
- Production Usage - Supported production-facing usage expectations.
- Compatibility - Supported Python, OS, and SSH server compatibility boundaries.