fabric
High level SSH command execution
What it is and what it does
Fabric is a Python library for executing shell commands on remote servers over SSH. It wraps Invoke (for local command execution and CLI features) and Paramiko (for SSH protocol handling), providing a unified Python API to run commands remotely and capture their output as structured objects. It's designed for system administrators and developers who need to automate server administration, deployments, or multi-host orchestration tasks.
The library sits at the intersection of local task automation and remote execution—you write Python code that reads like shell scripts but runs on remote machines, with results flowing back into your Python program. It handles SSH connection management, command execution, and result parsing, reducing boilerplate for common deployment and administration patterns.
Use it for:
- Automate multi-server deployments by running shell commands on remote hosts and capturing output in Python
- Build system administration scripts that execute tasks across clusters of machines over SSH
- Orchestrate application rollouts, configuration management, or maintenance routines on production servers
- Execute ad-hoc remote commands and collect results programmatically instead of writing shell scripts
- Integrate remote command execution into Python-based CI/CD pipelines or infrastructure-as-code workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fabric executes shell commands remotely over SSH and returns results as Python objects, building on Invoke for command execution and Paramiko for SSH protocol support.
Yes. Fabric is a mature, actively maintained library (production-stable, 15487 stars, recent commits) with low install friction and no known vulnerabilities. It solves a real problem—bridging Python and remote SSH execution—and is well-suited for deployment automation, system administration, and infrastructure tasks. The permissive BSD license poses no obstacle. Install it if you need programmatic remote command execution.
Install
fabric on PyPI
pip
pip install fabricuv
uv add fabricpoetry
poetry add fabricInstalling fabric
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release 130 days ago and ongoing commits; the repository is well-established with 15487 stars.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most deployment and automation workflows.
Quickstart
pip install fabric
from fabric import Connection
conn = Connection('host')
result = conn.run('ls -la')
print(result.stdout)
Verify before relying
- Whether version 3.2.3 maintains backward compatibility with code written for earlier Fabric releases
- Specific performance characteristics or scalability limits for large-scale multi-host orchestration
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — invoke, paramiko, decorator, deprecated |
| Maintenance | actively maintained — 130 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,714,378/month — #1,267 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fabric-3.2.3-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
fabric2Fabric executes shell commands remotely over…
permissive · top 15,000 on PyPI
Fabric3Fabric3 is a Python 2.7 and 3.4+ compatible…
permissive · top 15,000 on PyPI
invokeInvoke is a Python library for defining and…
permissive · top 1,000 on PyPI
paramikoParamiko is a pure-Python SSH protocol library…
copyleft · top 1,000 on PyPI
patchworkPatchwork provides idempotent Unix system…
permissive · top 15,000 on PyPI
awsCommand-line tool to manage Amazon EC2 and ELB…
permissive · top 15,000 on PyPI
proxmoxerProxmoxer is a Python wrapper for the Proxmox…
permissive · top 15,000 on PyPI
spurProvides a unified Python interface to run…
permissive · top 15,000 on PyPI
jumpsshJumpSSH runs commands on remote servers through…
permissive · top 15,000 on PyPI
paramiko-expectParamiko Expect adds expect-like pattern…
permissive · top 15,000 on PyPI