Welcome to Fabric! — Fabric documentation (original) (raw)

PyPI - Package Version PyPI - Python Version PyPI - License CircleCI Codecov

Fabric is a high level Python (2.7, 3.4+) library designed to execute shell commands remotely over SSH, yielding useful Python objects in return. It builds on top of Invoke (subprocess command execution and command-line features) and Paramiko (SSH protocol implementation), extending their APIs to complement one another and provide additional functionality.

To find out what’s new in this version of Fabric, please see the changelog.

The project maintainer keeps a roadmap on his website.

This website covers project information for Fabric such as the changelog, contribution guidelines, and so forth. Detailed usage and API documentation can be found at our code documentation site, docs.fabfile.org.

Please see below for a high level intro, or the navigation on the left for the rest of the site content.

What is Fabric?

Fabric is a high level Python (2.7, 3.4+) library designed to execute shell commands remotely over SSH, yielding useful Python objects in return:

from fabric import Connection result = Connection('web1.example.com').run('uname -s', hide=True) msg = "Ran {0.command!r} on {0.connection.host}, got stdout:\n{0.stdout}" print(msg.format(result)) Ran 'uname -s' on web1.example.com, got stdout: Linux

It builds on top of Invoke (subprocess command execution and command-line features) and Paramiko (SSH protocol implementation), extending their APIs to complement one another and provide additional functionality.

Note

Fabric users may also be interested in two strictly optional libraries which implement best-practice user-level code: Invocations (Invoke-only, locally-focused CLI tasks) and Patchwork(remote-friendly, typically shell-command-focused, utility functions).

How is it used?

Core use cases for Fabric include (but are not limited to):

In addition to these library-oriented use cases, Fabric makes it easy to integrate with Invoke’s command-line task functionality, invoking via a fabbinary stub:

I’m a user of Fabric 1, how do I upgrade?

We’ve packaged modern Fabric in a manner that allows installation alongside Fabric 1, so you can upgrade at whatever pace your use case requires. There are multiple possible approaches – see our detailed upgrade documentation for details.

What is this website?

www.fabfile.org provides project information for Fabric such as the changelog, contribution guidelines, development roadmap, news/blog, and so forth.

Detailed conceptual and API documentation can be found at our code documentation site, docs.fabfile.org.