Skip to content

SpindleX

Welcome to SpindleX's documentation! SpindleX is a modern, high-performance SSHv2 and SFTP client/server library.

PR Gate Compatibility Security Coverage PyPI Version Python Support License

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 cryptography library.
  • ๐Ÿ”— Full SSH & SFTP: Both client and server implementations for SSHv2 and SFTP.
  • ๐ŸŒ€ Native Async: First-class support for asyncio with AsyncSSHClient and AsyncSFTPClient.
  • ๐Ÿงช 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:

pip 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())

```