from fabric.api import run, sudo

def update():
    """Run `sudo apt-get update`.
    lorem ipsum
    """
sudo('apt-get update')

def hostname():
    """Run `hostname`"""
How to make a sudo command using Paramiko