Skip to main content

A modern, high-performance SSHv2 and SFTP client/server library

Project description

SpindleX - High-Performance SSH and SFTP Library for Python

SpindleX

Modern SSH library for secure automation, recursive SFTP, and high-performance deployments.

CI Status Coverage PyPI Version Python Support License PyPI Downloads Security Status


Quick StartDocsSecurityContributing

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.

[!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 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 cryptography library for robust, hardware-accelerated security.
  • 🔄 Native Async: First-class support for asyncio with AsyncSSHClient and AsyncSFTPClient.
  • 🛡️ 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

# The default policy is RejectPolicy, which requires the server's
# host key to be present in the client's known-hosts store.
with SSHClient() as client:
    client.get_host_keys().load()  # loads ~/.ssh/known_hosts by default
    client.connect('example.com', username='admin')

    stdin, stdout, stderr = client.exec_command('uptime')
    print(f"Status: {stdout.read().decode().strip()}")

[!CAUTION] AutoAddPolicy is available for throw-away test environments only — it silently trusts first-seen server keys and therefore offers no MITM protection. In production, use the default RejectPolicy with a managed known_hosts file.

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.

Full Cycle Demo


🚀 Performance & Multi-Tasking

Command Execution SFTP Operations
SSH Demo SFTP Demo
Blazing fast command processing High-throughput recursive transfers
Async Concurrency Benchmark vs Paramiko
Async Demo Benchmark
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.


Developed with precision by Di3Z1E.
© 2026 SpindleX Project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spindlex-0.6.4.tar.gz (138.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spindlex-0.6.4-py3-none-any.whl (152.7 kB view details)

Uploaded Python 3

File details

Details for the file spindlex-0.6.4.tar.gz.

File metadata

  • Download URL: spindlex-0.6.4.tar.gz
  • Upload date:
  • Size: 138.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spindlex-0.6.4.tar.gz
Algorithm Hash digest
SHA256 f7642ce24d03fe2230c0f60c0e98acdb022b175e3d73271a733beaab070ca0d8
MD5 914fe69705377ef1667d0848729a7c2e
BLAKE2b-256 797f1fc693d0db25f98a5b324722a1be79917d696c9b7b8f88a1cabb83fb8961

See more details on using hashes here.

Provenance

The following attestation bundles were made for spindlex-0.6.4.tar.gz:

Publisher: release.yml on Di3Z1E/spindlex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spindlex-0.6.4-py3-none-any.whl.

File metadata

  • Download URL: spindlex-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 152.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spindlex-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1c13f6d47ae17efcb1453aac5f353a70dcbb0d686e00165dc0febcc2d2b76d6a
MD5 4d76bd92b1e72d099cb9aa2c914d559f
BLAKE2b-256 b914590998e993d282165a2a83e71783dccefb54d0a303867015731b8b9fa9a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for spindlex-0.6.4-py3-none-any.whl:

Publisher: release.yml on Di3Z1E/spindlex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page