def upload_project(local_dir=None, remote_dir="", use_sudo=False):
    runner = use_sudo and sudo or run

    local_dir = local_dir or os.getcwd()

    # Remove final '/' in local_dir so that basename() works
    local_dir = local_dir.rstrip(os.sep)

    local_path, local_name = os.path.split(local_dir)
    tar_file = "%s.tar.gz" % local_name
    target_tar = os.path.join(remote_dir, tar_file)
    tmp_folder = mkdtemp()

    try:
        tar_path = os.path.join(tmp_folder, tar_file)
        local("tar -czf %s -C %s %s" % (tar_path, local_path, local_name))
        put(tar_path, target_tar, use_sudo=use_sudo)
        with cd(remote_dir):
            try:
                runner("tar -xzf %s" % tar_file)
            finally:
                runner("rm -f %s" % tar_file)
    finally:
        local("rm -rf %s" % tmp_folder)
This will init the payload property
dataset/ETHPy150Open fabric/fabric/fabric/contrib/project.py/upload_project--crossover with--dataset/ETHPy150Open dropbox/pynsot/pynsot/models.py/Network.init_payload