code: def upload_hub(hub, host, remote_dir, user=None, port=22, rsync_options=RSYNC_OPTIONS, staging=None):
      
      hub.render()
      if staging is None:
          staging = tempfile.mkdtemp()
      staging, linknames = stage_hub(hub, staging=staging)
      local_dir = os.path.join(staging)
      upload(host, user, local_dir=local_dir, remote_dir=remote_dir, rsync_options=rsync_options)
      return linknames
docs: Renders, stages, and uploads a hub.