skillfed

fabric2

High level SSH command execution

fabric2 v3.2.3 98.3K downloads/30d#13,094 on PyPI15,487
Permissive license BSD Active released

What it is and what it does

Fabric is a Python library for executing shell commands on remote systems over SSH. It wraps Invoke (for local subprocess and CLI features) and Paramiko (for SSH protocol) into a unified API that lets you write Python code to automate system administration, deployment, and orchestration tasks across multiple servers.

You define tasks in Python, connect to remote hosts via SSH, run commands, and capture their output as Python objects. This makes it natural to script complex multi-host operations, error handling, and conditional logic in Python rather than shell scripts. The library is actively maintained, has no known vulnerabilities, and supports modern Python versions across Linux, macOS, and Windows.

Use it for:

  • Deploy applications to production servers by running remote build, test, and install commands over SSH.
  • Automate system administration tasks like user provisioning, log rotation, or service restarts across a fleet of servers.
  • Orchestrate multi-step workflows that require conditional logic and error handling across multiple remote hosts.
  • Run ad-hoc commands on remote systems and capture output for monitoring, auditing, or reporting.
  • Build custom deployment pipelines that integrate with your Python codebase and CI/CD 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 Python objects, building on Invoke and Paramiko to provide a high-level interface for remote command execution and system administration tasks.

Yes. Fabric is a mature, actively maintained library with no known vulnerabilities, low install friction, and a permissive license. It is the standard choice for Python-based SSH automation and remote command execution. Install it if you need to automate tasks across remote systems from Python code.

Install

fabric2 on PyPI

pip

pip install fabric2

uv

uv add fabric2

poetry

poetry add fabric2

Installing fabric2

Before you install

Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent commit history and carries four straightforward runtime dependencies (invoke, paramiko, decorator, deprecated), all of which are well-established libraries.

License in practice

Licensed under BSD (permissive), so you can use Fabric in commercial and proprietary projects without restriction, though you must include the license notice in distributions.

Quickstart

pip install fabric2

from fabric import Connection

conn = Connection('user@example.com')
result = conn.run('ls -la')
print(result.stdout)

Requires SSH access to a remote host; the remote system must have a shell available for command execution.

Verify before relying

  • Whether Python 2.7 support mentioned in the description excerpt is still active in version 3.2.3 or has been dropped.
  • Specific performance characteristics or limits for concurrent remote command execution.

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 98,314/month — #13,094 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fabric2-3.2.3-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: Build ToolsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: ClusteringTopic :: System :: Software DistributionTopic :: System :: Systems Administration

Tags

remote ssh command executionpython ssh libraryremote server automationfabric deployment toolssh task runnerparamiko wrapperremote shell commands
ssh-automationdeploymentsystems-administration

More Software Development packages