pathos helps run map and apply workloads across local processes and remote hosts with configurable launchers and optional SSH-tunneled RPC.
Overview
pathos is a Python framework for heterogeneous parallel and distributed computing. It aims to make map and apply drop-in replacements in otherwise serial code by routing work through pluggable launchers for multiprocessing, SSH remotes, parallelpython-style pools, and related backends in the broader Pathos ecosystem.
The package can configure and start RPC services on remote machines, coordinate ports with a portpicker helper, and expose high-level pool.map interfaces that hide RPC details. Distributed map and pipe algorithms can mix local processors with remote workers, with basic load balancing or manual resource selection. Nested maps support hierarchical workflows.
Security-sensitive RPC traffic can be wrapped automatically in SSH tunnels. Lower-level APIs cover launching remote processes, copying files with scp, and managing tunnels. Convenience scripts pathosconnect and portpicker install to the user PATH for setup and testing.
Install with pip; it depends on companion packages such as dill, pox, ppft, and multiprocess. Worker pool types include serial, thread, process, parallel, and specialized secure connection classes for production-style distributed runs.
Key features
- Distributed map and apply pools
- SSH and scp remote launch
- SSH-tunneled RPC
- Multiple worker pool backends
- pool.map high-level API
- portpicker and pathosconnect scripts
- Nested heterogeneous maps
- Basic load balancing
Use cases
- Parallel Python map workloads
- Remote cluster calculations
- Secure distributed RPC jobs
- Hierarchical parallel pipelines