Skip to main content

fab-classic is a simple, Pythonic tool for remote execution and deployment.

Project description

fab-classic is a Python (2.7 or 3.4+) 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.16, fab-classic depends on paramiko-ng instead of paramiko. Both of those packages are imported with the name paramiko, and unfortunately that means that you should make sure you uninstall paramiko before paramiko-ng is installed, or you will get strange issues (even if things seem to work at first).

Starting with version 1.18, you can switch back to depending on the package named paramiko by setting the environment variable PARAMIKO_REPLACE=1 while installing fab-classic:

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

(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).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fab-classic-1.19.0.tar.gz (218.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fab_classic-1.19.0-py2.py3-none-any.whl (92.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fab-classic-1.19.0.tar.gz.

File metadata

  • Download URL: fab-classic-1.19.0.tar.gz
  • Upload date:
  • Size: 218.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.2

File hashes

Hashes for fab-classic-1.19.0.tar.gz
Algorithm Hash digest
SHA256 7717e487f4f76888b0a620ed64e3e12b6d1ee7c323ba8cd2b06e8c3ded4423fa
MD5 c8b58468d51677f58d92939e93a25950
BLAKE2b-256 b2b61aa0d8e41812d49731eb6ae1937f5adeb2da7448a894d19b8d7195bc4984

See more details on using hashes here.

File details

Details for the file fab_classic-1.19.0-py2.py3-none-any.whl.

File metadata

  • Download URL: fab_classic-1.19.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 92.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.2

File hashes

Hashes for fab_classic-1.19.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a1b9cc6a3ea07c37075a92a6e6168a089a55f5e76817afbb19726cdf6ff4d87b
MD5 ffd2443c64ea4dbed1895410f17535ea
BLAKE2b-256 1fe81adda3c5a68df0d29e7326e39e43badbc67e96a456678d0579b6a8679740

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page