Skip to content
AppClap
Fabric is unclaimed —
F

Fabric

Pythonic remote execution·fabfile.org

Visit

Fabric is a high-level Python library (2.7, 3.4+) designed to execute shell commands remotely over SSH, returning useful Python objects. It builds on top of Invoke, for subprocess execution and command-line task features, and Paramiko, for the SSH protocol implementation. It supports running single commands or Python code blocks on individual hosts or across multiple hosts (serially or in parallel), and includes a command-line tool, fab, for defining and running tasks such as deployments.

What it's for

Running single shell commands on an individual remote hostRunning single shell commands across multiple hosts serially or in parallelRunning Python functions/methods targeted at an individual SSH connectionRunning the same Python code block across multiple hostsDefining CLI-addressable tasks (e.g. fab deploy) with pre- or post-task hooksTransferring files to/from remote hostsSuperuser command execution via auto-response (sudo)

Features 17

  • Auto-response for interactive prompts such as sudo password
  • Can be installed alongside Fabric 1.x via the fabric2 package for gradual upgrades
  • CLI flag --list-agent-keys to list local SSH agent keys
  • Consistent shell command execution API across local and remote calls
  • Execute shell commands remotely over SSH
  • Expanded configuration system supporting multiple config files, formats, and env vars
  • fab command-line tool for CLI-addressable tasks
  • File transfer capability (put)
  • Gateway/jump-host support with native ProxyJump-style nesting
  • GNU/POSIX-style per-task command-line argument parsing
  • Interactive shell command behavior with simultaneous capture and display
  • Python functions/methods can target individual or multiple connections
  • Run commands on single or multiple hosts (SerialGroup, ThreadingGroup)
  • SSH config file loading enabled by default
  • Tasks can declare pre- and post-task dependencies
  • Testing helpers (fabric.testing, MockRemote) for mocking SSH/SFTP in tests
  • Thread-safe API built around Connection objects instead of global state

At a glance

free tieropen sourceAPI
TypeLibrary / SDK
DeploymentInstalled (local)
CompanyJeff Forcier

Integrations

InvokeParamiko

Resources

Pricing

Fabric itself is free to use. Professionally-supported Fabric is available through the Tidelift Subscription, but no price for that support is listed on the pages.

Last checked 20 days ago·