Skip to main content

fab-classic is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

fab-classic is forked from Fabric 1.14 and is intended to add only bug fixes and compatibility patches, for projects already using Fabric-1.x in some way. It includes python3 compatibility patches from Fabric3.

Upstream Fabric is now on version 2.x. Fabric-2.x is python3 compatible, and comes after Fabric3. Fabric-2.x has significant compatibility-breaking changes, in order to fix some long-standing limitations.

Install

fab-classic is on PyPI, so you can pip install fab-classic

Be sure to pip uninstall fabric first if you happen to have it installed, because fab-classic uses the same import name “fabric” and entrypoint (tool) name “fab”.

Starting with version 1.21, fab-classic depends on the original paramiko again, while previous versions of fab-classic depended on paramiko-ng instead by default. Both of those packages are imported with the name paramiko, and unfortunately that means that you need to make sure you uninstall the existing variant before the other variant is installed (which happen automatically when pip installs or upgrades fab-classic) or you will get strange issues.

With fab-classic 1.21 you can switch back to depending on paramiko-ng by setting the environment variable PARAMIKO_REPLACE=1 while installing fab-classic:

PARAMIKO_REPLACE=1 pip install --no-binary fab-classic fab-classic==1.21.0

This worked the opposite way in previous versions of fab-classic.

(paramiko-ng also supports PARAMIKO_REPLACE, see paramiko-ng#installation)

Documentation

API Documentation: https://ploxiln.github.io/fab-classic/

Changelog: https://github.com/ploxiln/fab-classic/releases

For a quick command reference, run fab --help

Usage Introduction

fab-classic provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

Typical use involves creating a Python module containing one or more functions, then executing them via the fab command-line tool. Below is a small but complete “fabfile” containing a single task:

from fabric.api import run

def host_type():
    run('uname -s')

If you save the above as fabfile.py (the default module that fab loads), you can run the tasks defined in it on one or more servers, like so:

$ fab -H localhost,linuxbox host_type
[localhost] run: uname -s
[localhost] out: Darwin
[linuxbox] run: uname -s
[linuxbox] out: Linux

Done.
Disconnecting from localhost... done.
Disconnecting from linuxbox... done.

In addition to use via the fab tool, Fabric’s components may be imported into other Python code, providing a Pythonic interface to the SSH protocol suite at a higher level than that provided by the paramiko-ng library (which Fabric itself uses).

Metadata

Release files for fab-classic 1.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fab-classic 1.21.0
File Size Uploaded
fab_classic-1.21.0.tar.gz 216.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fab-classic 1.21.0
File Interpreter ABI Platform
fab_classic-1.21.0-py3-none-any.whl Python 3 none any Details

Total release size: 308.0 kB

Release files / fab_classic-1.21.0.tar.gz

Download URL fab_classic-1.21.0.tar.gz
Size 216.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7544ef05a7caa2d22ab2405bb9eeac74239f401d29fb6ea6a267ef4fb6ed51c
BLAKE2b-256 checksum
How to use checksums
a7bd7d6909d2ce6a024d1442570035cde31161d7691dba724b5359239ce53fce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / fab_classic-1.21.0-py3-none-any.whl

Download URL fab_classic-1.21.0-py3-none-any.whl
Size 91.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
070fa7b5c01d243d464e8dd4e7ba32b0478f0e7f74b4a9b048b58ec93d37375a
BLAKE2b-256 checksum
How to use checksums
905c46f6f5a75207ea93e923c79a6acabb611e88409f2452ce2433fba680864a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page