At selltag we are using [Fabric][fabric] for deploying, we started using Capifony, but it gave us some problems (not returning prompt when necessary input among other things), so we switched to Fabric and now It’s working flawlessly.

We use Github for development. During iterations when issues are reviewed and are ready to be deployed, we add the tag deploy to them, so we know what’s gonna be deployed for that iteration. We need to have good issue descriptions so non-technical mates could easily understand the new goodies we are deploying to production.

With Fabric and Python is so easy to integrate several of the services we use every day, saving time in the process. Every time we upload something to our environments, we publish in [Slack][slack] so the team knows we are updating the server. When we push to production we also publish in our global chat room with the changes deployed. A very easy way of doing that is using [pyslack][pyslack] and [libsaas][libsaas].

You could install them using pip:

pip install pyslack
pip install libsaas

We get github issues with label=deploy and status=open:

from import github

# ...
GH_USER = 'selltag'
REPO = 'web'

def get_issues():
    gh_client = github.Github(GH_TOKEN)
    issues_gh = gh_client.repo(GH_USER, REPO).issues().get(
    issues = [issue['title'] for issue in issues_gh]
    return issues

We use slack to publish a message, using the username selltagbot:

import slack

# ...

def publish(msg, channel='web'):
    slack.api_token = SLACK_TOKEN
        ''.join(['#', channel],

Then when we execute deploy we could have something like this

# ...

def prod():
    env.label = 'PROD' = '...'
    env.root = '...'
    # ...
def dev():
    env.label = 'DEV' = '...'
    env.root = '...'
    # ...

def deploy(install=False):
"""Run the actual deployment steps: $ fab dev deploy"""
    with cd(env.root):
        publish('Deploying to %s in %s' % (env.label,
        # ...
        # Only publish message with issues if production
        if env.label is 'PROD':

When we do:

fab prod deploy

We publish a message in the general slack channel with the issues deployed. :-)

To know more about how Fabric works I recommend checking the [Fabric website][fabric].