builder

Module: binderhub.builder

Handlers for working with version control services (i.e. GitHub) for builds.

BuildHandler

class binderhub.builder.BuildHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)

A handler for working with GitHub.

emit(data)

Emit an eventstream event

get(provider_prefix, _unescaped_spec)

Get a built image for a given spec and repo provider.

Different repo providers will require different spec information. This function relies on the functionality of the tornado GET request.

Parameters:
  • provider_prefix (str) – the nickname for a repo provider (i.e. ‘gh’)
  • spec – specifies information needed by the repo provider (i.e. user, repo, ref, etc.)
keep_alive()

Constantly emit keepalive events

So that intermediate proxies don’t terminate an idle connection

launch(kube, provider)

Ask JupyterHub to launch the image.

on_finish()

Stop keepalive when finish has been called

send_error(status_code, **kwargs)

event stream cannot set an error code, so send an error event