Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple, Pythonic remote execution and deployment

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 fabric
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 FAQ
Octocat-spinner-32 INSTALL
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 README
Octocat-spinner-32 requirements.txt
Fabric is a Python library and command-line tool designed to streamline
deploying applications or performing system administration tasks via the SSH
protocol. It provides tools for running arbitrary shell commands (either as a
normal login user, or via ``sudo``), uploading and downloading files, and so

Typical use involves defining a "fabfile" (a Python module) containing one or
more functions or tasks which may then be executed by the ``fab`` command-line
tool. For example, here's a small (but complete) ```` containing a
single task::

    from fabric.api import run

    def host_type():
        Prints host type (via ``uname -s``) for a remote host.
        run('uname -s')

Executing this on an arbitrary server or list of servers is simple (below,
we're using an ssh-agent, and so there are no password prompts)::

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

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

Fabric provides extra functionality related to this mode of use, such as
prompting for user input, ensuring certain variables are present in order for
tasks to run, and specifying which host or hosts a specific task connects to
by default.

Fabric may also be used as a standalone library, so that other Python programs
needing a simple but powerful API on top of SSH or SCP may import and utilize
specific pieces of functionality.
Something went wrong with that request. Please try again.