birdy.client.notebook module

class birdy.client.notebook.Form(func)[source]

Bases: object

Create notebook form to launch WPS process.

Parameters:

func (function) – A function.

build_ui(input_widgets, of_widgets, go)[source]

Create the form.

Parameters:
  • input_widgets (dict) – Input widgets.

  • of_widgets (dict) – Output form widgets.

  • go (str) – Footer.

Returns:

An instance of the UI.

Return type:

AppLayout

get(asobj: bool = False)[source]

Return the process response outputs.

Parameters:

asobj (bool) – If True, object_converters will be used.

input_widget_values(widgets: dict) dict[source]

Return values from input widgets.

Parameters:

widgets (dict) – A dictionary of input widgets.

Returns:

A dictionary of input values.

Return type:

dict

input_widgets(inputs: dict) dict[source]

Return input parameter widgets.

Parameters:

inputs (dict) – A dictionary of input parameters.

Returns:

A dictionary of input widgets.

Return type:

dict

output_format_widget_values(widgets: dict) dict[source]

Return the output_formats dict from output_formats widgets.

Parameters:

widgets (dict) – output_formats widgets.

Returns:

A dictionary of output_formats.

Return type:

dict

output_formats_widgets(outputs: dict) dict[source]

Return output formats parameter widgets for ComplexData outputs that have multiple supported formats.

Parameters:

outputs (dict) – A dictionary of output parameters.

Returns:

A dictionary of output format widgets.

Return type:

dict

birdy.client.notebook.gui(func)[source]

Return a Notebook form to enter input values and launch process.

Parameters:

func (function) – A function.

Returns:

A form to enter input values and launch the process.

Return type:

Form

birdy.client.notebook.input2widget(inpt: owslib.wps.Input)[source]

Return a Notebook widget to enter values for the input.

Parameters:

inpt (Input) – A WPS Input instance.

Returns:

Widget.

Return type:

Any

birdy.client.notebook.is_notebook()[source]

Return whether this function is executed in a notebook environment.

birdy.client.notebook.monitor(execution: owslib.wps.WPSExecution, sleep: int = 3)[source]

Monitor the execution of a process using a notebook progress bar widget.

Parameters:
  • execution (WPSExecution instance) – The execute response to monitor.

  • sleep (int) – Number of seconds to wait before each status check.

birdy.client.notebook.output2widget(output)[source]

Return notebook widget based on output mime-type.

Parameters:

output (Any) – Unused.