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. It makes some common “easy” use-cases more difficult, and porting to it can be a large task.
fab-classic is on PyPI, so you can pip install fab-classic
API Documentation: https://ploxiln.github.io/fab-classic/
New Changelog: https://github.com/ploxiln/fab-classic/releases
Old Changelog: https://ploxiln.github.io/fab-classic/old_changelog.html
For a quick command reference, run fab --help
Starting with version 1.16 (not yet released), 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 (which can happen while installing fab-classic from git master), or else paramiko-ng will not really be installed, even though pip thinks it is. (Stuff will still use original paramiko and work, but you may want paramiko-ng and will have to uninstall both before installing paramiko-ng actually works.)
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fab_classic-1.15.3b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f1b80bdeeaebe7ca8b0f42055b846c7c00e5a0d171be30af00f282fa49ea2b9 |
|
MD5 | 56cdbba76cb017f5f4b8c0f5c2822195 |
|
BLAKE2b-256 | 3612dab60cd21b95a172af9f88373202bfb5f6cd17482807f7c492a10f792ce2 |